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

Categories

HOME
openlayers
single-sign-on
json.net
routes
jsp-tags
google-docs
setup-deployment
v8
ravendb
directx
multiple-records
node-notifier
cloudkit
u-sql
vaadin7
seaborn
ef-migrations
sms-gateway
excel-vba-mac
contextmenu
jtextfield
nas
arabic
wkwebview
autosys
bootstrap-duallistbox
virtualdub
typo3-6.2.x
saas
jspm
windows-server-2000
libssl
google-rich-snippets
oracle-fusion-middleware
titanium-mobile
openoffice.org
bower-install
neuroscience
unspecified
splice
graphenedb
jvm-languages
netcdf4
sas-jmp
flow-control
hittest
synchronous
removechild
android-textview
measures
paypal-express
sdf
endeca-workbench
ibaction
processmodel
key-management
truevault
facebook-graph-api-v2.4
winddk
googlemock
valueconverter
poller
cloud-connect
stxxl
gridfs
ruby-datamapper
android-screen-support
sabredav
robotics-studio
clipper
pvrtc
funscript
word-processor
tridion-worldserver
buildr
nsdatecomponents
data-loss
yetanotherforum
telerik-scheduler
icanhaz.js
getresponsestream
firefox-5
webkit.net
photoshop-cs4
swing-app-framework
port-number
data-acquisition

Resources

Encrypt Message