java
plugin-devlopment: view call another class
I am trying to create a view plugin in the Eclipse environment. I need to call another class, but when I use as usual Class cl=new Class(); it does not work: private void makeActions() { action1 = new Action() { public void run() { showMessage("Action 1 executed"); DataInterfc interface=new DataInterfc(); } }; action1.setText("Informations"); action1.setToolTipText("Action 1 tooltip"); action1.setImageDescriptor(PlatformUI.getWorkbench().getSharedImages(). getImageDescriptor(ISharedImages.IMG_OBJS_INFO_TSK)); I get a problem in DataInterfc interface=new DataInterfc(). Do I need to define the class I want to callin plugin.xml or what to do exact? Can you help me please
interface is a reserved keyword in Java you cannot use it as a variable name (see here). Use some other name: DataInterfc interfce = new DataInterfc(); The DataInterfc class must be defined in your plugin or in a plugin that you declare in your plug-in's dependencies.
interfaces cannot be instantiated, that's just basic Java
Related Links
Empty ResultSet after executing PreparedStatement
Java parsing Error
Emacs enum indentation
Converting SQL with subselect in select to HQL
Retrieve the full path to a folder on an intranet
Hibernate query:Don't delete child when removing association with parent
memory leakage in this code?
Adding a progress bar to webview
HTML Parser fetch link text
Eclipse: Java, no main method found
Route to study Java EE and associated technology?
Java generic interfaces with typesafe implementations
Deleting Part of An Array in Java to Free Memory on Heap
Why do some APIs provide mostly interfaces, not classes?
Strange compilation error - GAS3 generated class
jdb conditional breakpoint