Well, I've solved my problem by changing the following:
objectClass="org.eclipse.cdt.core.model.ICProject"
to this:
objectClass="org.eclipse.core.resources.IProject"
May be, my solution will help somebody in future. I've tested it in
Java and C\C++ Perspectives both. It works at all of them and it is
suitable for me.
31.10.2011 15:36, Sergey Smolov пишет:
Hello, List!
I need to add special item to the popup menu, that appears in
C\C++ Perspective. Here is the following fragment of my
plugin.xml:
<extension
point="org.eclipse.ui.popupMenus">
<objectContribution
adaptable="false"
objectClass="org.eclipse.cdt.core.model.ICProject"
id="CppTESKPluginIDE.objectContribution1">
<menu
label="C++TesK Menu"
path="additions"
id="cppteskpluginide.menu1">
<separator
name="group1">
</separator>
</menu>
<action
class="cppteskpluginide.PopupMenuActionDelegate"
enablesFor="1"
id="cppteskplugin.action1"
label="Toggle CppTESK Highlighting"
menubarPath="additions">
</action>
</objectContribution>
</extension>
The PopupMenuActionDelegate class implements
IObjectActionDelegate class methods, like run(),
selectionChanged() and setActivePart().
My problem is that it does not work. It worked in Java
Perspective, when I used "....IFile" as objectClass parameter
value, but what should I do now to repair it?
Thanks in advance!
--
Sincerely yours,
Sergey Smolov
ISP RAS
--
Sincerely yours,
Sergey Smolov
ISP RAS
|