Eclipse JSHint plugin issue - eclipse

JSHint working fine from the CLI (W7 OS with Git Bash)
Have Eclipse Kepler SR2
Just installed JSHint from Marketplace
Went to Project --> Properties... set firstly *.js (all files)... Apply
Result: did not pick up this line or signal it in any way (when the line was added):
if( app.thing == null ) console.log( 'bleat!' );
then set all files... Apply
Result: did not pick up the line (when entered).
Anyone got an idea what I might be doing wrong?

Related

Android NDK Source Compiled & Build Successfully - But Function 'to_string' could not be resolved in Eclipse IDE

I searched how to use to_string() in android ndk. After a long search, from this link, i changed the Application.mk file as said. And the cpp source compiled and build properly only from the terminal.
Terminal output :
> ndk-build
Android NDK: WARNING: APP_PLATFORM android-21 is larger than android:minSdkVersion 9 in
/<some path>/Android/Exercise01/AndroidManifest.xml
[armeabi-v7a] Install : libndkfoo.so => libs/armeabi/libndkfoo.so
But in ecplise IDE, still i am getting error as "Function 'to_string' could not be resolved". So from the IDE i am not able to run the android application. (Note : before the usage of std::to_string, the source compiled properly)
I tried to include the header files as below (under project properties->C/C++ general->Path and Symbols->GNU C++)
vstring.h from //android-ndk-r10d/sources/cxx-stl/gnu-libstdc++/4.9/include/ext
&
basic_string.h from //android-ndk-r10d/sources/cxx-stl/gnu-libstdc++/4.9/include/bits
But no luck.
Androi.mk File
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_LDLIBS := -llog
TARGET_PLATFORM := android-21
TARGET_ARCH_ABI := armeabi-v7a
TARGET_ABI := android-21-armeabi-v7a # concatenation of above two variables
# Here we give our module name and source file(s)
LOCAL_MODULE := ndkfoo
LOCAL_C_INCLUDES := $(LOCAL_PATH)/header
LOCAL_SRC_FILES := src/NativeFunction.cpp src/clsArithmeticParser.cpp
include $(BUILD_SHARED_LIBRARY)
Application.mk
#APP_STL := stlport_static
APP_STL:=c++_static
I know, i am doing some small mistake, but not able to find for a long time. Any solution/suggestion appreciated.
Edited :
I am able use the std::to_string & std::stoll through eclipse in the below trick only. These can help some one in rare situation. So adding this point to test the c++11 support through eclipse IDE. The error shown only when the source file or the header file opened. Just close open source file documents (.h, .c, .cpp). Close and reopen the eclipse. Now it is ready to compile and run through the android emulator.
What version of Eclipse IDE do you use? Try to update to the latest Mars version, it may fix your problem.
After referring the answer by #Khaled Lakehal, I myself posting this answer for my question.Hope this may help someone.
Followed the below step to make it work:
Update the eclipse version from Luna to latest Mars 2
Imported the existing project from the old version of the eclipse
using -> import -> Existing Android code into Workspace
Had some problem with the C/C++ project conversion after import. So followed this link to undo the C/C++ project conversion
Converted the project to C/C++ newly.
To remove the error, I referred this link, and selected the "Run with build" only
Close & Reopen the IDE
So now able to use the std::to_string & std::stoll functions.

How do I get Eclipse Mars to compile C++11 with MinGW?

I have read every post I can find. I have Eclipse Mars release 4.5.1 and MinGW GCC ver 4.8.1
I have done the following:
Create new workspace.
Created File > New > C++ Project.>Executable>Hello World
Built and Run successfully
added the line
auto i = 6;
The IDE shows
'auto' changes meaning in C++11; please remove it [-
Wc++0x-compat]
I then went to project>C/C++ Build>Settings>Tool Settings>GCC C++ Compiler>Dialect>Language standard and selected C++11.
I also went to project>C/C++ General>Preprocessor Include Path>Providers Select CDT GCC Built-in Compiler Settings and untick “Use global provider...” box then add –std=c++0x
Finally I chose Project>Refresh and Project>Index>Rebuild
But still the error on auto.
Is this Wc++0x-compat switch a problem? Where do I find it?
What else should I do?

MakeGood-Error with PhpUnit in Eclipse

I want to use the Eclipse plugin "makegood" to use php-unit-tests in Eclipse. When I'm running phpunit on console, everything is working.
I followed the following instruction to set up the makegood-plugin in Eclipse: http://www.stuermer-benjamin.de/v12_1/eclipse-4-2-with-php-android-and-unit-testing/
The status of makegood is "Waiting for a test run...", but when I try to run a unit-test, I get this error printed in the console:
Fatal error: Class
> 'Stagehand\TestRunner\CLI\TestRunnerApplication\Command\CommandRepository'
> not found in C:\Users\myNameWith18Charac
> \.eclipse\org.eclipse.platform_4.3.0_1709980481_win32_win32_x86_64\plugins\com.piece_framework.makegood.stagehandtestrunner_2.5.0.v201311031709\resources\php\php\Stagehand\TestRunner\CLI\TestRunnerApplication\Application.php
> on line 64
>
> Call Stack:
> 0.0000 148336 1. {main}() C:\Users\myNameWith18Charac\.eclipse\org.eclipse.platform_4.3.0_1709980481_win32_win32_x86_64\plugins\com.piece_framework.makegood.stagehandtestrunner_2.5.0.v201311031709\resources\php\bin\testrunner.php:0
> 0.0100 460744 2. Stagehand\TestRunner\CLI\TestRunnerApplication\Application->__construct()
> C:\Users\myNameWith18Charac\.eclipse\org.eclipse.platform_4.3.0_1709980481_win32_win32_x86_64\plugins\com.piece_framework.makegood.stagehandtestrunner_2.5.0.v201311031709\resources\php\bin\testrunner.php:58
The class Stagehand\TestRunner\CLI\TestRunnerApplication\Command\CommandRepository is existing!
Is the path maybe too long? But I don't know, how to change it. I'm using win7 x64.
I'm seeing the same thing in Ubuntu, running Eclipse Kepler and PDT 3.3.
Enabling debug in MakeGood, I can see that the command that's actually being run is php with a single argument of the file I'm currently viewing (E.G the test).
It simply doesn't work as advertised, as it's just trying to execute the file on its own.
Downgrading to Eclipse 3.8 (Juno), and PDT 3.0.0 worked for me.
*Edit:
You can define a custom bash script as the php executable as a workaround, and hardcode the path to testrunner.php
#!/bin/bash
# MakeGood for PHP stopped working after Eclipse Indigo (3.8) due to inability to run testrunner.php
# This is a hack PHP binary, to be configured as PHP executable for MakeGood to start working in Juno, Kepler and Luna.
# Remove the -n operator to read all config files
options=`echo $# | sed 's%-n %%' | sed 's%-c .+? %%'`
# Hardcode path to testrunner.php
options=`echo $options | sed 's#open_tag=on [^ ]*#open_tag=on /opt/testrunner.php
/usr/bin/php $options

PyDev import in eclipse

I just installed Eclipse Indigo, in Ubuntu 10.04 LTS, and installed Pydev with it. I did the following:
(1) set python interpreters by pressing Auto config in Window > Preferences > PyDev > Editor > Interpreter-Python
(2) set system Pythonpath through Window > Preferences > PyDev > Editor > Interpreter-Python
(a) pressed New Folder and added /usr/lib/python2.6
I am trying to run an openrave code in eclipse and have all the required openrave libraries installed. "openravepy" is in the directory /usr/lib/python2.6/dist-packages.
My problems is that it seems that the import is not successful that a few function calls return error type : PyDev Problem. It says 'Undefined Variable: ...'
here are some snippets of the code:
from itertools import izip
from openravepy import *
from numpy import *
import time
class FastGrasping:
class GraspingException(Exception):
def __init__(self,args):
self.args=args
def __init__(self,robot,target):
self.robot = robot
self.ikmodel = databases.inversekinematics.InverseKinematicsModel(robot=robot,iktype=IkParameterization.Type.Transform6D)
--databases is part of openravepy and described as undefined variable.
I've read a few threads and I already did the following
(1) Remove and readd pydev
(2) I've run the code previously, it used to work with eclipse helios and pydev setup. so, I Deleted and reinstall eclipses helios and indigo and repeat the process of adding pydev and pythonpath again and again.
Anyone know hows can I fix this? or is this a bug in pydev?
thanks in advance.
cheers
Have you tried adding 'openravepy' to the forced builtins (see: http://pydev.org/manual_101_interpreter.html for details)?
Also, does it run properly? (i.e.: the issue only happens in the PyDev code-analysis or also when you run the code in Python from within PyDev?)
I have found that the Auto config does not always auto select the site-packages directory. This is where most installed modules reside, numpy for example on my machine. Try doing auto-config once more and also select the directory ending in site-packages, if you have not done so already.

Eclipse Indigo CDT: Function could not be resolved

This feels silly, but its been 2 days...somewhere after upgrading from Ubuntu 10.04 to 10.11 and from Eclipse Helios to Eclipse Indigo, I got stuck with the following problem:
Problem Description:
I'm trying to use a function in math.h called isinf(), but the problem also occurs with things like isnan(). The program compiles fine on the command line using make and fine in eclipse using build. But if I open the program file in eclipse it reports that it cannot reolve the isinf() function call. If I just insert the program contents into a new project and new source file, the error appears immediately. This problem did not occur under 11.04 with Eclipse Helios CDT
Questions:
Why are these errors only reported when the program file is opened and not on when the program is compiled; why are the errors not detected make is run from the command line? Is there a solution/workaround available?
Version Info
Linux Ubuntu 10.11 64-bit
Eclipse CDT Indigo, Service Release 1, Build id: 20110916-0149
(Also using Eclipse EE Indigo – if that makes a difference)
GNU Make 3.81
gcc 4.6.1-9Ubuntu3
To Duplicate:
Please find the two files you'll need to replicate below:
Step 0. Verify that everything is fine outside of Eclipse
Copy the attached source file and make file
create a directory e.g. Mkdir FunTest
Save the source file a 'Test.cpp' and the makefile as 'makefile'
Open a command prompt and navigate to the directory e.g. FunTest
Enter 'make'
Enter ./TestOut
Program responds “is not infinite”
Step 1. Create the project in Eclipse
Open Eclipse
Select File|New|MakeFile Project with Existing Code
Click Browse – navigate to the directory (FunTest) and click ok
Select 'Linux GCC' from the Toolchain selector
Click Finish
Step 2. Find the Error
Click Build All (Ctrl-B) – project builds without errors
Open the project in the project explorer to display the file in the directory
Double click on the file “Test.cpp”
Note the error icon next to line testing for infinity
Note the 2 error messages:
Semantic error: Function _isinff could not be resolved
Semantic error: Function _isinfl could not be resolved
Test.cpp:
include <math.h>
int main(int argc, char **argv)
{
int TestNum = 10;
if (isinf(TestNum) == 0)
printf("Not infinite\n");
return 0;
}
makefile:
# Specify the compiler
CC = g++
# Specify the compiler flags
CFLAGS += -c
# Specify the files making up the application
SOURCES = Test.cpp
OBJECTS = $(SOURCES:.cpp=.o)
EXECUTABLE = TestOut
all: $(EXECUTABLE)
$(EXECUTABLE): $(OBJECTS)
$(CC) $(LDFLAGS) $(OBJECTS) $(LDLIBS) -o $#
.cpp.o:
$(CC) $(CPPFLAGS) $(CFLAGS) $< -o $#
install:
#echo "Build complete!"
I have experienced similar problems of the CDT reporting errors even though the code compiled fine within Eclipse Indigo.
Project > Properties > Settings > Binary Parsers > "GNU Elf Parser"
helped in my case. I had the "Elf Parser" checked.
That looks like a problem that many others have had with eclipse CDT before. Sometimes shutting eclipse down and then starting it back up again is enough to help. If that isn't the case, take a look at what I have below:
Compilation ok, but eclipse content assist having problems
Check your includes: if you're using include<math.h> change it to include<cmath>. The same for stdio.h and stdlib.h, you should replace by cstdio and cstdlib. Another option may be change you project to a C project instead of a C++.
You are missing -lm option in your build preferences.
Project->Properties->Settings->Miscleanous->Other (linker) flags[]
For me, it was solved by adding a specific ‘Source Location’ folder, and removing the default. In Luna, it is under:
Project > Properties > C/C++ General > Paths and Symbols > Source
Location