[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Newsgroup Home]
|
[news.eclipse.platform.rcp] Re: Action set, Editor input
|
Hi Geri,
I am answering your questions inline:
Q1: Where am I wrong?
-> To check this problem, you may want to take a look at the log file. There
might be some exception which might be logged there. This I guess may be
because the application is not able to find some classes during its runtime. I
hope seeing the log should be helpful.
Q2: Would it be better to add the actions via an editorContribution (like
in
http://www.eclipse.org/articles/Article-action-contribution/index.html)?
With the advantage of disabled menu items, unless an editor window is
opened? But, as extension to WHICH editor? There are three used in the
text editor example above: AbstractTextEditor, SimpleEditor, XMLEditor.
-> As you said the advantage of using editorContribustion is that you will be
able to see the menu and tool items only when they are accessed. I am not sure
if you can group editors for these items, (it would be good though if it
possible :)). I am also trying for a similar feature, maybe your thread will
be helpful in this regard :).
2) When I add Sign and Verify via ApplicationActionBarAdvisor, the proper
classes are accessed, of course. The disadvantage is that this seems only
to be useful for menu items. When I add actions to the toolbar there,
labels are displayed, not icons. And the items are active even if there's
nothing to do (no editor has been opened).
-> I am not sure why this problem is arising. I have done this thing of adding
the actions in toolbar but haven't faced such problem. Have you added the icon
information for the actions in plugin.xml? Also, have you added the export
information for the icons folder in build.properties?
Q3: How do I get the contents of the currently active editor?
-> What information form the active editor do you require? If it is the
current editor input you can get it from getEditorInput().
Q4: How do I open an empty editor and fill it with contents (to display,
and optionally save, changed data without harming the original file)?
-> I don't get your question. Save the file optionally without harming the
original file?