Affichage des articles dont le libellé est Active questions tagged eclipse - Stack Overflow. Afficher tous les articles
Affichage des articles dont le libellé est Active questions tagged eclipse - Stack Overflow. Afficher tous les articles

lundi 11 mai 2015

IResourceChangeListener rename and set EditorPart name dynamically

IResourceChangeListener listens to changes in project workspace for example if the editor part file name has changed.

I want to know how to access that particular EditorPart and change its title name accordingly (e.g. with .setPartName), or maybe the refresh the editor so that it shows the new name automatically.

Ideal would be if the IResourceChangeListener has a Rename event type but does not seem to be the case.

Eclipse Android Game - Crashes when I hit Play

I've been following some tutorials online to try to get a grasp of basic android development, and I seem to be stuck. There are no errors in my code, but a few warnings and whenever I press play from the main menu, it crashes. If anyone could help out that'd be greatly appreciated!!

This is my MainActivity.java

package com.example.shadowassassinstu3;

import com.example.shadowassassinstu3.Game;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.telephony.PhoneStateListener;
import android.telephony.TelephonyManager;
import android.view.Menu;
import android.view.View;
import android.widget.TextView;


public class MainActivity extends Activity {

    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
    }

    public void play(View v)
    {
        Intent i=new Intent(this,Game.class);
        startActivity(i);
    }

    public void exit(View v)
    {
        System.exit(0);
    }
}

This is my Game.java

package com.example.shadowassassinstu3;

import com.example.shadowassassinstu3.gameloop;
import com.example.shadowassassinstu3.Game.GameView;
import com.example.shadowassassinstu3.Game.TeleListener;
import com.example.shadowassassinstu3.R;

import android.annotation.SuppressLint;
import android.app.Activity;
import android.content.Context;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.graphics.Canvas;
import android.os.Bundle;
import android.telephony.PhoneStateListener;
import android.telephony.TelephonyManager;
import android.view.Display;
import android.view.MotionEvent;
import android.view.SurfaceHolder;
import android.view.SurfaceView;
import android.view.Window;
import android.view.WindowManager;

public class Game extends Activity {
    gameloop gameLoopThread;
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        //phone state
        TelephonyManager TelephonyMgr = (TelephonyManager) getSystemService(Context.TELEPHONY_SERVICE);
        TelephonyMgr.listen(new TeleListener(),PhoneStateListener.LISTEN_CALL_STATE);
        //for no title
        this.requestWindowFeature(Window.FEATURE_NO_TITLE);
        this.getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);
        setContentView(new GameView(this));     
    }

    public class GameView extends SurfaceView {
        Bitmap bmp,pause;
        Bitmap background;
        Bitmap run1;
        Bitmap run2;
        Bitmap run3;
        Bitmap exit;

        private SurfaceHolder holder;
        private int x = 0,y=0,z=0,delay=0,getx,gety;
        int show=0,sx,sy;
        int cspeed=0,kspeed=0,gameover=0;
        int score=0,health=100,reset=0;
        int pausecount=0,volume,power=0,powerrun=0,shieldrun=0;

        @SuppressWarnings("deprecation")
        @SuppressLint("NewApi")
        public GameView(Context context) 
          {
              super(context);

              gameLoopThread = new gameloop(this);
              holder = getHolder();

                 holder.addCallback(new SurfaceHolder.Callback() {
                @SuppressWarnings("deprecation")
                @Override
                public void surfaceDestroyed(SurfaceHolder holder) 
                {
                    gameLoopThread.setRunning(false);
                    gameLoopThread.getThreadGroup().interrupt();
                }

                @SuppressLint("WrongCall")
                @Override
                public void surfaceCreated(SurfaceHolder holder) 
                {
                      gameLoopThread.setRunning(true);
                      gameLoopThread.start();

                }
                @Override
                public void surfaceChanged(SurfaceHolder holder, int format,int width, int height) 
                        {

                        }
                });



                Display display = getWindowManager().getDefaultDisplay();

                sx = display.getWidth();
                sy = display.getHeight();;
                background = BitmapFactory.decodeResource(getResources(), R.drawable.back);
                run1=BitmapFactory.decodeResource(getResources(), R.drawable.run1);
                run2=BitmapFactory.decodeResource(getResources(), R.drawable.run2);
                run3=BitmapFactory.decodeResource(getResources(), R.drawable.run3);
                exit=BitmapFactory.decodeResource(getResources(), R.drawable.exit);
                pause=BitmapFactory.decodeResource(getResources(), R.drawable.pause);

                exit=Bitmap.createScaledBitmap(exit, 25,25, true);
                pause=Bitmap.createScaledBitmap(pause, 25,25, true);
                run1=Bitmap.createScaledBitmap(run1, sx/9,sy/7, true);
                run2=Bitmap.createScaledBitmap(run2, sx/9,sy/7, true);
                run3=Bitmap.createScaledBitmap(run3, sx/9,sy/7, true);
                background=Bitmap.createScaledBitmap(background, 2*sx,sy, true);

    }


     // on touch method

          @Override
            public boolean onTouchEvent(MotionEvent event) {

                if(event.getAction()==MotionEvent.ACTION_DOWN)
                {
                    show=1;

                    getx=(int) event.getX();
                    gety=(int) event.getY();

                // restart game
                if(getx>91&&gety<25)
                {
                    if(health<=0)
                    {
                        gameLoopThread.setPause(0);
                        health=100;
                        score=0;

                    }
                }
                //pause game
                if((getx>(sx-25)&&gety<25&&pausecount==0))
                {

                    gameLoopThread.setPause(1);
                    pausecount=1;
                }
                else if(getx>(sx-25)&&gety<25&&pausecount==1)
                {
                    gameLoopThread.setPause(0);
                    pausecount=0;
                }
            }

            return true;
        }


        @SuppressLint("WrongCall")
        @Override
        protected void onDraw(Canvas canvas) 
        {
            //background moving
            z=z-10;
            if(z==-sx)
            {
                z=0;
                canvas.drawBitmap(background, z, 0, null);

            }
            else
            {
                canvas.drawBitmap(background, z, 0, null);  
            }

            //running player 

         x+=5;
         if(x==20)
         {
             x=5;
         }

          if(show==0)
          {
              if(x%2==0)
              {
                  canvas.drawBitmap(run3, sx/16, 15*sy/18, null);

              }
              else 
              {
                  canvas.drawBitmap(run1, sx/16, 15*sy/18, null);

              }
          }

          canvas.drawBitmap(exit, 0, 0, null);
          canvas.drawBitmap(pause, (sx-25), 0, null);
        }
    }

    //phone state
    public class TeleListener extends PhoneStateListener 
    {
        public void onCallStateChanged(int state,String incomingNumber)
        {
            if(state==TelephonyManager.CALL_STATE_RINGING)
                {
                    System.exit(0);  
                }
        } 

    }
}

and this is my gameloop.java

package com.example.shadowassassinstu3;

import com.example.shadowassassinstu3.Game.GameView;
import android.annotation.SuppressLint;
import android.graphics.Canvas;

public class gameloop extends Thread {

    private GameView view;
    static final long FPS = 10;
    private boolean running = false;
       boolean isPaused;

    public gameloop(GameView view) {
          this.view = view;
    }

    public void setRunning(boolean run) {

          running = run;
    }

    public void setPause(int i)
    {
        synchronized (view.getHolder()) 
        {


            if(i==0)
            {
                isPaused=false;
            }
            if(i==1)
            {
                isPaused = true;
            }
         }
    }

    public void run() {
           long ticksPS = 100;
           long startTime = 0;
           long sleepTime;
              while (running) {
                  //pause and resume

                if (isPaused) 
                {
                      try 
                      {
                          this.sleep(50);
                      } 
                      catch (InterruptedException e) 
                      {
                        e.printStackTrace();
                      }
                }
                else
                {
                     Canvas c = null;
                     startTime = System.currentTimeMillis();
                     try {

                            c = view.getHolder().lockCanvas();

                            synchronized (view.getHolder()) 
                            {
                                view.onDraw(c);
                            }

                          } 
                     finally 
                     {
                         if (c != null) 
                            {
                                view.getHolder().unlockCanvasAndPost(c);
                            }
                     }
                   }
                     sleepTime = ticksPS-(System.currentTimeMillis() - startTime); 

                     try {

                            if (sleepTime > 0)
                               sleep(sleepTime);
                            else
                               sleep(10);
                        } 
                catch (Exception e) {}

              }

        }
}

A lot of the code I've gotten through watching tutorials and I really can't figure out what's wrong, if anyone could help I'd really appreciate it!

I think this is what you guys asked for:

05-11 10:23:51.966: D/AndroidRuntime(1894): Shutting down VM 05-11 10:23:51.966: D/AndroidRuntime(1894): --------- beginning of crash 05-11 10:23:51.966: E/AndroidRuntime(1894): FATAL EXCEPTION: main 05-11 10:23:51.966: E/AndroidRuntime(1894): Process: com.example.shadowassassinstu3, PID: 1894 05-11 10:23:51.966: E/AndroidRuntime(1894): java.lang.IllegalStateException: Could not execute method of the activity 05-11 10:23:51.966: E/AndroidRuntime(1894): at android.view.View$1.onClick(View.java:4007) 05-11 10:23:51.966: E/AndroidRuntime(1894): at android.view.View.performClick(View.java:4756) 05-11 10:23:51.966: E/AndroidRuntime(1894): at android.view.View$PerformClick.run(View.java:19749) 05-11 10:23:51.966: E/AndroidRuntime(1894): at android.os.Handler.handleCallback(Handler.java:739) 05-11 10:23:51.966: E/AndroidRuntime(1894): at android.os.Handler.dispatchMessage(Handler.java:95) 05-11 10:23:51.966: E/AndroidRuntime(1894): at android.os.Looper.loop(Looper.java:135) 05-11 10:23:51.966: E/AndroidRuntime(1894): at android.app.ActivityThread.main(ActivityThread.java:5221) 05-11 10:23:51.966: E/AndroidRuntime(1894): at java.lang.reflect.Method.invoke(Native Method) 05-11 10:23:51.966: E/AndroidRuntime(1894): at java.lang.reflect.Method.invoke(Method.java:372) 05-11 10:23:51.966: E/AndroidRuntime(1894): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:899) 05-11 10:23:51.966: E/AndroidRuntime(1894): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:694) 05-11 10:23:51.966: E/AndroidRuntime(1894): Caused by: java.lang.reflect.InvocationTargetException 05-11 10:23:51.966: E/AndroidRuntime(1894): at java.lang.reflect.Method.invoke(Native Method) 05-11 10:23:51.966: E/AndroidRuntime(1894): at java.lang.reflect.Method.invoke(Method.java:372) 05-11 10:23:51.966: E/AndroidRuntime(1894): at android.view.View$1.onClick(View.java:4002) 05-11 10:23:51.966: E/AndroidRuntime(1894): ... 10 more 05-11 10:23:51.966: E/AndroidRuntime(1894): Caused by: android.content.ActivityNotFoundException: Unable to find explicit activity class {com.example.shadowassassinstu3/com.example.shadowassassinstu3.Game}; have you declared this activity in your AndroidManifest.xml? 05-11 10:23:51.966: E/AndroidRuntime(1894): at android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:1761) 05-11 10:23:51.966: E/AndroidRuntime(1894): at android.app.Instrumentation.execStartActivity(Instrumentation.java:1485) 05-11 10:23:51.966: E/AndroidRuntime(1894): at android.app.Activity.startActivityForResult(Activity.java:3736) 05-11 10:23:51.966: E/AndroidRuntime(1894): at android.app.Activity.startActivityForResult(Activity.java:3697) 05-11 10:23:51.966: E/AndroidRuntime(1894): at android.app.Activity.startActivity(Activity.java:4007) 05-11 10:23:51.966: E/AndroidRuntime(1894): at android.app.Activity.startActivity(Activity.java:3975) 05-11 10:23:51.966: E/AndroidRuntime(1894): at com.example.shadowassassinstu3.MainActivity.play(MainActivity.java:25) 05-11 10:23:51.966: E/AndroidRuntime(1894): ... 13 more 05-11 10:23:55.283: I/Process(1894): Sending signal. PID: 1894 SIG: 9

Is it ok to declare an object to be equal to itself in Javascript for the sake of refactoring a large project

I'm working on a very large javascript web app that doesn't really have a method to it. There seems to be an attempt to declare everything as part of a master object called "app". The original program existed as a single app.js file over 300k lines of code where the following was declared:

var app = {};

Beyond that everything in the app is written as such.

app.somefunction = function(args, callback) { 
    some code
};

This apparently allowed for the author to handily use Eclipse IDE "outline", which I confess I have started to enjoy having, never previously having been an IDE user I'm becoming a convert to the niceties they provide.

My question is, as I work on a phased refactor of this huge codebase, potentially trying to merge it into some sort of more established framework perhaps using something like require.js, is it OK to split the "app.js" up into smaller files and for the sake of sanity to be able to use the IDE outline declare app to be equal to itself in each one.

app = app;

I've tested this, it works from what I can tell and it allows the IDE to add all the subsequent functions to the outline window while making the project a little more manageable while I learn what it is actually doing. Are there any drawbacks to doing this? I imagine some async loading issues might occur; this could possibly add to client side overhead; or is this perfectly acceptable?

I realize that this is sort of a code philosophy question, but the simple Q&A would be, what effect would app=app; have?

Upgrade to JUnit 4 in Eclipse

I tried switching to JUnit 4 in Eclipse using the instructions in this answer: http://ift.tt/1IwEE3T.

It basically says to remove any JUnit 3 library in the build path (I removed a JUnit 3.7 jar) and add the JUnit 4 library, which I did.

However, when I run the following code in my test class:

import junit.runner.Version;
System.out.println("JUnit version is: " + Version.id());

I get:

JUnit version is: 3.8.1

I don't have any other JUnit libraries in my buildpath.

If it's relevant, the exact Eclipse version is "Indigo Service Release 1, Build id: 20110916-0149".

How can I fix this and run JUnit 4?

Android Application run in a real Mobile but not in Eclipse

My application run in my real mobile phone but not in Eclipse+Android Studio Enviroment. I check class and Android Manifest and are same. Whats wrong ?

My codes are:

1) MainActivity.java

package com.example.homework2;

import android.support.v7.app.ActionBarActivity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.EditText;


public class MainActivity extends ActionBarActivity 
{
    EditText firstnameText;
    Button goButton, aboutButton;

    @Override
    protected void onCreate( Bundle savedInstanceState ) 
    {
        super.onCreate( savedInstanceState );       
        setContentView( R.layout.activity_main );       

        //firstnameText = ( EditText ) findViewById( R.id.editText1 );
        //String name = firstnameText.getText().toString();
/*      
        goButton =  ( Button ) findViewById( R.id.letsgo_button );
        goButton.setOnClickListener( new OnClickListener() 
        {
            @Override
            public void onClick( View v ) 
            {
                // TODO Auto-generated method stub
            }
        }); 
*/      
        aboutButton = ( Button ) findViewById( R.id.about_button );
        aboutButton.setOnClickListener( new OnClickListener() 
        {
            @Override
            public void onClick(View v) 
            {
                // TODO Auto-generated method stub
                Intent about = new Intent( MainActivity.this, About.class );
                startActivity( about );
            }           
        });
    }
}

2) activity_main.xml

<RelativeLayout xmlns:android="http://ift.tt/nIICcg"
    xmlns:tools="http://ift.tt/LrGmb4"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    tools:context="com.example.homework2.MainActivity" >

    <ImageView
        android:id="@+id/imageView1"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_alignLeft="@+id/editText1"
        android:layout_alignParentBottom="true"
        android:layout_alignParentRight="true"
        android:scaleType="centerCrop"
        android:src="@drawable/wallpaper1" />

    <EditText
        android:id="@+id/editText1"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_alignTop="@+id/imageView1"
        android:layout_centerHorizontal="true"
        android:layout_marginTop="35dp"
        android:paddingTop="16px"
        android:paddingBottom="16px"
        android:background="#2B3856"
        android:ems="10"
        android:inputType="textPersonName"
        android:text="Enter your Name: "
        android:textColor="#E8E8E8"
        android:textStyle="bold" >

        <requestFocus />
    </EditText>

    <Button
        android:id="@+id/about_button"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_alignBottom="@+id/imageView1"
        android:layout_centerHorizontal="true"
        android:background="#101010"
        android:text="About"
        android:textColor="#F8F8F8"
        android:textStyle="bold" />

    <Button
        android:id="@+id/letsgo_button"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_above="@+id/about_button"
        android:layout_alignLeft="@+id/imageView1"
        android:layout_marginBottom="16dp"
        android:background="#3B0B0B"
        android:text="Let&apos;s GO !!!"
        android:textColor="#E8E8E8"
        android:textStyle="bold" />

</RelativeLayout>

3) About.java

package com.example.homework2;

import android.support.v7.app.ActionBarActivity;
import android.os.Bundle;

public class About extends ActionBarActivity 
{   
    @Override
    protected void onCreate( Bundle savedInstanceState ) 
    {
        super.onCreate( savedInstanceState );
        setContentView( R.layout.about );
    }
}

4) about.xml

   <?xml version="1.0" encoding="utf-8"?>
    <RelativeLayout xmlns:android="http://ift.tt/nIICcg"
        android:layout_width="match_parent"
        android:layout_height="match_parent" >


        <ImageView
            android:id="@+id/imageView1"
            android:layout_width="match_parent"
            android:layout_height="463dp"
            android:layout_x="1dp"
            android:layout_y="-8dp"
            android:scaleType="centerCrop"
            android:src="@drawable/wallpaper2" />

        <EditText
            android:id="@+id/editText2"
            android:layout_width="match_parent"
            android:layout_height="209dp"
            android:layout_x="-1dp"
            android:layout_y="101dp"
            android:textColor="#FFFFFF"
            android:textStyle="bold|italic"   
            android:ems="10"
            android:gravity="center"
            android:text="Πριν δυο χρόνια ο Σερ Άλεξ Φέργκιουσον σταμάτησε την προπονητική. Η συγκεκριμένη εφαρμογή βάζει ένα κουίζ στους οπαδούς της ομάδας, για τα πεπραγμένα του Σκωτσέζου κόουτς στον πάγκο της Μάντσεστερ Γιουνάιτεντ." >

            <requestFocus />
        </EditText>
    </RelativeLayout>

5) AndroidManifest

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://ift.tt/nIICcg"
    package="com.example.homework2"
    android:versionCode="1"
    android:versionName="1.0" >

    <uses-sdk
        android:minSdkVersion="7"
        android:targetSdkVersion="21" />

    <application
        android:allowBackup="true"
        android:icon="@drawable/ic_launcher"
        android:label="@string/app_name"
        android:theme="@style/AppTheme" >
        <activity
            android:name=".MainActivity"
            android:label="@string/app_name" >
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>

        <activity
            android:name=".About"
            android:label="@string/app_name" >
            <intent-filter>
                <action android:name="com.example.homework2.ABOUT" />
                <category android:name="android.intent.category.DEFAULT" />
            </intent-filter>
        </activity>
    </application>
</manifest>

Java - JSON and Parent Shells

I'm kind of new to Java and programming some first programs using SWT GUI with Eclipse.

I got a few things I don't understand and will appreciate some explanations, preferably expanded to me the easiest way possible.

Can someone please tell me what is the best way for me to save a String ArrayList of properties after the program is shut down?

I was told to save it to a text file, and use JSON to read and write, but I could not understand how to do it. I need to be able to get this information from the user and save it for future use.

Is JSON the best way for my needs?

For example, I will need to save these information arrays:

folder: D:\Videos
buttonsPerLine: 7
labelLength: 75
menuButtonLength: 60
spaceFromLeft: 20
spaceFromTop: 20
Shows:
    brooklyn nine nine
    community
    the big bang theory
    the blacklist

and these:

linkArray1:
    www.youtube.com/1
    www.youtube.com/2
    www.youtube.com/3
linkArray2:
    www.youtube.com/1
    www.youtube.com/2
    www.youtube.com/3
linkArray3:
    www.youtube.com/1
    www.youtube.com/1

Thank you very much!

Can't launch the java program

I found this code on the site oracle but I can't launch with Eclipse it's saying me "Unable to launch". I have installed JDK 8 but it doesn't work...

Anybody have a solution please ? :p

public class SwingFX extends Application {

@Override
public void start (Stage stage) {
    final SwingNode swingNode = new SwingNode();

    createSwingContent(swingNode);

    StackPane pane = new StackPane();
    pane.getChildren().add(swingNode);

    stage.setTitle("Swing in JavaFX");
    stage.setScene(new Scene(pane, 250, 150));
    stage.show();
    }

private void createSwingContent(final SwingNode swingNode) {
    SwingUtilities.invokeLater(new Runnable() {
        @Override
        public void run() {
            swingNode.setContent(new JButton("Click me!"));
        }
    });
}
}

link to the website where I found the code : http://ift.tt/1Ffsv46

eclipse errors after java update [on hold]

I have just updated Java from a notification that came into my taskbar tray. Since the update Eclipse has brought up a variety of errors. Every line now has an error, I think it could be something to do with with Eclipse being unable to use the new update but I'm stumped as to what I can do to correct this.

I'm fairly new to Eclipse and Java so any help would be greatly appreciated.

The main error states "The error states the path was not built since its build path is incomplete. Cannot find the class file for java.lang.Object. Fix the build path then try building this project" I don't think Eclipse can locate the Java libraries, it states it can't resolve System or Scanner. All my classes have the same errors. I was using Java v1.8.42 previously then I did the update

Is it worth reinstalling it?

Hibernate production use warning

This warning comes up evertime i use hibernate.

Mai 11, 2015 3:42:20 PM org.hibernate.engine.jdbc.connections.internal.DriverManagerConnectionProviderImpl configure
WARN: HHH000402: Using Hibernate built-in connection pool (not for production use!)

Do i have to be worried about this? The tables are created without problem, but this warning makes me unsure about my hibernate.cfg.xml configuration file.

Thx in advance for your support.

Making a list of all combinations of 2 letters and 4 numbers

I have been trying to create a code that can make a list of all combinations of 2 letters and 4 numbers

EX: aa1111, ab1111

the only thing that i can come up with are programs that print combinations that are against my outline

EX: aatc9e, gj3ru7

What can I do that makes it so it stops at two letters and goes to the four numbers?

Playframework create eclipse project

I am use play version i can not create eclipse project playframework via command line, i get next errors. I am use activator version 1.3.2; java -version 1.8 and javac -version 1.6. How solved my problem?

[myProject] $ eclipse
[info] About to create Eclipse project files for your project(s).
[info] Updating {http://file:/D:/activator-1.3.2-minimal/myProject/}root...
[info] Resolving org.scala-lang#scala-library;2.11.1 ...

[myProject] $ eclipse
[info] About to create Eclipse project files for your project(s).
[info] Updating {http://file:/D:/activator-1.3.2-minimal/myProject/}root...
[info] Resolving org.scala-lang#scala-library;2.11.1 ...
[error] D:\activator-1.3.2-minimal\myProject\app\controllers\Application.java:3: error: package play does not exist
[error] import play.*;
[error] ^
[error] D:\activator-1.3.2-minimal\myProject\app\controllers\Application.java:4: error: package play.mvc does not exist
[error] import play.mvc.*;
[error] ^
[error] D:\activator-1.3.2-minimal\myProject\app\controllers\Application.java:8: error: cannot find symbol
[error] public class Application extends Controller {
[error]                                  ^
[error]   symbol: class Controller
[error] D:\activator-1.3.2-minimal\myProject\app\controllers\Application.java:10: error: cannot find symbol
[error]     public static Result index() {
[error]                   ^
[error]   symbol:   class Result
[error]   location: class Application
[error] D:\activator-1.3.2-minimal\myProject\target\scala-2.11\classes\controllers\ReverseAssets.class: warning: Cannot find annotation method 'bytes(
)' in type 'ScalaSignature': class file for scala.reflect.ScalaSignature not found
[error] D:\activator-1.3.2-minimal\myProject\target\scala-2.11\classes\controllers\ReverseApplication.class: warning: Cannot find annotation method 'b
ytes()' in type 'ScalaSignature'
[error] D:\activator-1.3.2-minimal\myProject\target\scala-2.11\classes\controllers\javascript\ReverseAssets.class: warning: Cannot find annotation met
hod 'bytes()' in type 'ScalaSignature'
[error] D:\activator-1.3.2-minimal\myProject\target\scala-2.11\classes\controllers\javascript\ReverseApplication.class: warning: Cannot find annotatio
n method 'bytes()' in type 'ScalaSignature'
[error] D:\activator-1.3.2-minimal\myProject\target\scala-2.11\classes\controllers\ref\ReverseAssets.class: warning: Cannot find annotation method 'by
tes()' in type 'ScalaSignature'
[error] D:\activator-1.3.2-minimal\myProject\target\scala-2.11\classes\controllers\ref\ReverseApplication.class: warning: Cannot find annotation metho
d 'bytes()' in type 'ScalaSignature'
[error] D:\activator-1.3.2-minimal\myProject\target\scala-2.11\classes\views\html\index.class: warning: Cannot find annotation method 'bytes()' in typ
e 'ScalaSignature'
[error] D:\activator-1.3.2-minimal\myProject\app\controllers\Application.java:11: error: cannot access Html
[error]         return ok(index.render("Your new application is ready."));
[error]                               ^
[error]   class file for play.twirl.api.Html not found
[error] 5 errors
[error] 7 warnings
[error] (compile:compile) javac returned nonzero exit code
[error] Could not create Eclipse project files:
[error] Error evaluating task 'dependencyClasspath': error

Is there a way that IntelliJ generates GUI designer code that is usable in Eclipse?

I already tried the option to generate the designer code into the *.java files but this is not the complete code. Is there any other way to do that? Thank you for your help.

Google Play Services running on Emulator

Adding Google Play Services lib (v.7327000) to my app, it works well on real devices but Activity crashes and I get error on running emulator (Google API 21/22, tried Nexus4/5/10) like this:

"E/OpenGLRenderer(2560): Could not allocate texture for layer (fbo=1 2560x1326)"

Tried with Android Studio (selective lib) and Eclipse (library project). Does anyone know a solution ?

Advice defined has not been applied

I have a AspectJ - Project with a aspect to making some System.out.println's to learning a little bit about aspects etc.

The Problem is, that the advices which i define to the cuts doesn't work. The warning which is shown is: advice defined in ShapeAspect has not been applied [Xlint:adviceDidNotMatch]

I'm working with a Mac OS X 10.10 Yosemite, Eclipse Luna Service Release 2 (4.4.2) and AspectJ Runtime: org.aspectj.runtime_1.8.5.20150128171000.jar, for the LTW classes etc.: org.aspectj.weaver_1.8.5.20150128171000.jar and additionally org.aspectj.ajde_1.8.5.20150128171000.jar.

My simple defined aspect:

public aspect ShapeAspect {
   // pointcuts
   pointcut myPointcut2() : execution(oldshape.Point.new(..));

  // advices
  before() : myPointcut2(){
    System.out.println("Before init.");
  }
}

But at the line of before().. is the Warning: advice defined in ShapeAspect has not been applied [Xlint:adviceDidNotMatch]

What is the Problem here? On my PC with Windows it works correctly?

Titan IllegalArgumentException:Could not instantiate implementation:com.thinkaurelius.titan.diskstorage.cassandra.astyanax.AstyanaxStoreManager

I'm a beginner with Titan Graph Database and I'm just trying to create a simple titan graph in a particular path using eclipse.Initially , setting the titan configurations followed by creating two vertices and an edge. This is the code i had given :

public class TitanGraphDemo {
        private static final String TITAN_DB = "target/tmp/titan";
        private static final Logger logger = LoggerFactory.getLogger(TitanGraphDemo.class);
        public static void init() {
            Configuration  conf = new BaseConfiguration();
            conf.setProperty("storage.directory", TITAN_DB);
            conf.setProperty("storage.backend","cassandra");
            conf.setProperty("storage.hostname","127.0.0.1");
            conf.setProperty("storage.port","9160");
            TitanGraph graph = TitanFactory.open(conf);

            Vertex rash = graph.addVertex(null);
            rash.setProperty("userId", 1);
            rash.setProperty("username", "rash");
            rash.setProperty("firstName", "Rahul");
            rash.setProperty("lastName", "Chaudhary");
            rash.setProperty("birthday", 101);

            Vertex honey = graph.addVertex(null);
            honey.setProperty("userId", 2);
            honey.setProperty("username", "honey");
            honey.setProperty("firstName", "Honey");
            honey.setProperty("lastName", "Anant");
            honey.setProperty("birthday", 201);

            Edge frnd = graph.addEdge(null, rash, honey, "FRIEND");
            frnd.setProperty("since", 2011);
            graph.commit();
            logger.info("Titan graph loaded successfully.");
        }
    }

But when i run the java, i am getting IllegalArgumentException as below.

Exception in thread "main" java.lang.IllegalArgumentException: Could not instantiate implementation: com.thinkaurelius.titan.diskstorage.cassandra.astyanax.AstyanaxStoreManager
    at com.thinkaurelius.titan.util.system.ConfigurationUtil.instantiate(ConfigurationUtil.java:55)
    at com.thinkaurelius.titan.diskstorage.Backend.getImplementationClass(Backend.java:421)
    at com.thinkaurelius.titan.diskstorage.Backend.getStorageManager(Backend.java:361)
    at com.thinkaurelius.titan.graphdb.configuration.GraphDatabaseConfiguration.<init>(GraphDatabaseConfiguration.java:1275)
    at com.thinkaurelius.titan.core.TitanFactory.open(TitanFactory.java:93)
    at com.thinkaurelius.titan.core.TitanFactory.open(TitanFactory.java:73)
    at titan.TitanGraphDemo.init(TitanGraphDemo.java:37)
    at titan.TitanGraphDemo.main(TitanGraphDemo.java:113)
Caused by: java.lang.reflect.InvocationTargetException
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
    at java.lang.reflect.Constructor.newInstance(Unknown Source)
    at com.thinkaurelius.titan.util.system.ConfigurationUtil.instantiate(ConfigurationUtil.java:44)
    ... 7 more
Caused by: java.lang.NoSuchMethodError: com.netflix.astyanax.impl.AstyanaxConfigurationImpl.setTargetCassandraVersion(Ljava/lang/String;)Lcom/netflix/astyanax/impl/AstyanaxConfigurationImpl;
    at com.thinkaurelius.titan.diskstorage.cassandra.astyanax.AstyanaxStoreManager.getContextBuilder(AstyanaxStoreManager.java:474)
    at com.thinkaurelius.titan.diskstorage.cassandra.astyanax.AstyanaxStoreManager.<init>(AstyanaxStoreManager.java:267)
    ... 12 more

I have added the dependencies for titan, cassandra. Please anyone guide me with this issue.

Details of dependencies added in pom.xml is as below :

<!-- Libraries -->
    <dependencies>
        <!-- TinkerPop -->
        <dependency>
            <groupId>com.tinkerpop.blueprints</groupId>
            <artifactId>blueprints-core</artifactId>
            <version>2.6.0</version>
        </dependency>
        <dependency>
            <groupId>com.tinkerpop.blueprints</groupId>
            <artifactId>blueprints-test</artifactId>
            <version>2.6.0</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.tinkerpop.gremlin</groupId>
            <artifactId>gremlin-groovy</artifactId>
            <version>2.1.0</version>
            <exclusions>
                <exclusion>
                    <artifactId>gossip</artifactId>
                    <groupId>org.sonatype.gossip</groupId>
                </exclusion>
            </exclusions>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.tinkerpop.rexster</groupId>
            <artifactId>rexster-core</artifactId>
            <version>2.1.0</version>
        </dependency>
        <!-- Utility -->
        <dependency>
            <groupId>commons-collections</groupId>
            <artifactId>commons-collections</artifactId>
            <version>3.2.1</version>
        </dependency>
        <dependency>
            <groupId>commons-configuration</groupId>
            <artifactId>commons-configuration</artifactId>
            <version>1.6</version>
        </dependency>
        <dependency>
            <groupId>commons-io</groupId>
            <artifactId>commons-io</artifactId>
            <version>2.0.1</version>
        </dependency>
        <dependency>
            <groupId>com.google.guava</groupId>
            <artifactId>guava</artifactId>
            <version>12.0</version>
        </dependency>
        <dependency>
            <groupId>colt</groupId>
            <artifactId>colt</artifactId>
            <version>1.2.0</version>
        </dependency>
        <dependency>
            <groupId>com.googlecode</groupId>
            <artifactId>kryo</artifactId>
            <version>1.04</version>
        </dependency>
        <dependency>
            <groupId>org.apache.cassandra</groupId>
            <artifactId>cassandra-all</artifactId>
            <version>1.2.5</version>
        </dependency>
        <dependency>
          <groupId>org.objenesis</groupId>
          <artifactId>objenesis</artifactId>
          <version>2.1</version>
        </dependency>
        <dependency>
            <groupId>com.netflix.astyanax</groupId>
            <artifactId>astyanax</artifactId>
            <version>1.0.6</version>
        </dependency>

        <!-- Logging -->
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
            <version>1.7.6</version>
        </dependency>
       <!--  <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-log4j12</artifactId>
            <version>1.6.1</version>
        </dependency> -->
        <dependency>
            <groupId>log4j</groupId>
            <artifactId>log4j</artifactId>
            <version>1.2.16</version>
        </dependency>


        <!-- Storage backends -->
        <!-- HBase -->
        <dependency>
            <groupId>org.apache.hbase</groupId>
            <artifactId>hbase</artifactId>
            <!-- Update the hadoop-core artifact version when you update this -->
            <version>0.94.1</version>
            <exclusions>
                <exclusion>
                    <artifactId>avro</artifactId>
                    <groupId>org.apache.avro</groupId>
                </exclusion>
                <exclusion>
                    <artifactId>jruby-complete</artifactId>
                    <groupId>org.jruby</groupId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.apache.hadoop</groupId>
            <artifactId>hadoop-core</artifactId>
            <!-- Update the hbase artifact version when you update this -->
            <version>1.0.3</version>
        </dependency>
        <!-- Cassandra -->
       <dependency>
            <groupId>commons-pool</groupId>
            <artifactId>commons-pool</artifactId>
            <version>1.5.5</version>
        </dependency>
        <!-- BerkeleyDB -->
        <dependency>
            <groupId>com.sleepycat</groupId>
            <artifactId>je</artifactId>
            <version>5.0.58</version>
        </dependency>


        <!-- Test Dependencies -->
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.8.1</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-all</artifactId>
            <version>1.8.1</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.thinkaurelius.titan</groupId>
            <artifactId>titan-core</artifactId>
            <version>0.5.4</version>
        </dependency>
        <dependency>
            <groupId>com.thinkaurelius.titan</groupId>
            <artifactId>titan-cassandra</artifactId>
            <version>0.5.0</version>
        </dependency>
         <dependency>
            <groupId>com.thinkaurelius.titan</groupId>
            <artifactId>titan-all</artifactId>
            <version>0.5.0-M1</version>
        </dependency> 

        <dependency>
            <groupId>com.datastax.cassandra</groupId>
            <artifactId>cassandra-driver-core</artifactId>
            <version>2.0.0-beta2</version>
        </dependency>
    </dependencies>

Wrong .classpath generated for multimodule project by maven-eclipse-plugin

My project has the following structure:

/ProjectRoot
/ProjectRoot/A
/ProjectRoot/B
/ProjectRoot/C

ProjectRoot is a multimodule project. Project A should create war and it has dependencies to projects B and C delared in its pom. When I run maven eclipse:eclipse on ProjectRoot it results in incorrect .classpath file created for project A.

<classpath>
  <classpathentry kind="src" path="/B"/>
  <classpathentry kind="src" path="/C"/>
</classpath>

This stops the build in eclipse. Problems tabs displays:

Project 'A' is missing required Java project: 'B'
Project 'A' is missing required Java project: 'C'
The project cannot be built until build path errors are resolved

I know I can fix this problem manually(Properties/Build path/Projects remove the missing ones and then add them once again) but I would like to have the correct settings generated automatically by maven-eclipse-plugin.

Details of Nebula Nattable filtering

It looks as though implementing filter function in Nebula Nattable is difficult. Even the example given is hard to understand. would someone point to an explanation on the various classes used in implementing the filter function ?

Checkstyle validation fail when needs multiple lines

I need to perform a validation rule on eclipse checkstyle, after a key { of method and before end key } should have a empty line, example:

public void wrongMethod() {
    System.out.println("wrong method");
}

correct

public void correctMethod() {

    System.out.println("correct method");

}    

I try to use a RegexpMultiline in checkstyle rules xml file, doing some like this:

<module name="RegexpMultiline">
    <property name="format" value=".+\{\n.+[;]"/>
    <property name="message" value="should have empty line"/>
</module>  

sure, this Regex expression can be better, the issue is, the multiline behavior works in a regex simulator site with the examples above, but in checkstyle dont. I search on a checkstyle documentation and not found a ready reature for this.

Anyone know a solution for this issue?

thanks.

Rename resource file does not change editor part title

In my plugin project, I have a project explorer view where I can rename a config file which in shown in another editor part. The file can be renamed in the explorer with the rename resource dialog but the corresponding the editor tab title does not change. The same problem is described here and also here. Is there a standard way to get the rename functionality working without the creating a custom listener?

Can install RadRails on Eclipse Luna 4.4.2

I am trying to install the RadRails plug-in on a fresh Eclipse Luna instance (4.4.2), using the following update site: http://ift.tt/KNKjIh

But it always fails with the error below:

Cannot complete the install because one or more required items could not be found. Software being installed: Aptana RadRails 2.0.5.1278709071-79-7D7BFZcLCUQRF2NWAQhRBC1qP (com.aptana.radrails.feature.feature.group 2.0.5.1278709071-79-7D7BFZcLCUQRF2NWAQhRBC1qP) Missing requirement: Aptana Editor Infrastructure 2.0.5.1278523018-8o57z9icbz-hWlJZG (com.aptana.ide.feature.editors.feature.group 2.0.5.1278523018-8o57z9icbz-hWlJZG) requires 'org.eclipse.update.ui 0.0.0' but it could not be found

Cannot satisfy dependency: From: Aptana Web Development Tools 2.0.5.1278614541-7D-7O7iRJci-jVhz-KFyoijH (com.aptana.ide.feature.feature.group 2.0.5.1278614541-7D-7O7iRJci-jVhz-KFyoijH) To: com.aptana.ide.feature.editors.feature.group [2.0.5.1278523018-8o57z9icbz-hWlJZG] Cannot satisfy dependency: From: Aptana RadRails 2.0.5.1278709071-79-7D7BFZcLCUQRF2NWAQhRBC1qP (com.aptana.radrails.feature.feature.group 2.0.5.1278709071-79-7D7BFZcLCUQRF2NWAQhRBC1qP) To: com.aptana.ide.feature.feature.group [2.0.5.1278614541-7D-7O7iRJci-jVhz-KFyoijH]

What should I do to install RadRails?