English 中文(简体)
展示项目探索者的观点及其功能
原标题:showing project explorer view and its functionality to RCP

• 如何增加包裹 View all R R R R 我采用包裹式放大器观点,以显示包裹式放大器的观点。 它在申请中表明了观点。 但是,在一揽子计划外观中制定项目后,该项目并未显示为创建的学员提供的项目基数。 如何解决这一问题?

最佳回答

This is a known issue in Eclipse RCP applications.

周围的工作是,在你的申请工作中增加一些法典。

RCP中关于这一问题的更多文件

rel=“noreferer”>http://help.eclipse.org/ganymede/topic/org.eclipse.platform.doc.isv/guide/cnf_rcp.htm

我在最初的方法中加上这一代码,以便让图像在项目探索者中显示,因此,如果这些图像与这些图像不同,你就不必跟踪正确的图像,以补充一揽子探索者。

  public void initialize(IWorkbenchConfigurer configurer) {
     super.initialize(configurer);

     // here s some of my code that does some typical RCP type configuration
     configurer.setSaveAndRestore(true);
     PlatformUI.getPreferenceStore().setValue(
            IWorkbenchPreferenceConstants.SHOW_TRADITIONAL_STYLE_TABS, false);

    // here is the work around code
    /*
     * This is a hack to get Project tree icons to show up in the Project Explorer.
     * It is descriped in the Eclipse Help Documents here.
     * 
     * http://help.eclipse.org/ganymede/topic/org.eclipse.platform.doc.isv/guide/cnf_rcp.htm
     * 
     */

    IDE.registerAdapters();

    final String ICONS_PATH = "icons/full/";

    Bundle ideBundle = Platform.getBundle(IDEWorkbenchPlugin.IDE_WORKBENCH);

    declareWorkbenchImage(
            configurer, 
            ideBundle,
            IDE.SharedImages.IMG_OBJ_PROJECT, 
            ICONS_PATH + "obj16/prj_obj.gif",
            true);

    declareWorkbenchImage(
            configurer, 
            ideBundle,
            IDE.SharedImages.IMG_OBJ_PROJECT_CLOSED, 
            ICONS_PATH + "obj16/cprj_obj.gif", 
            true);


    /*
     * End of hack in this method... 
     */
}

private void declareWorkbenchImage(IWorkbenchConfigurer configurer_p, Bundle ideBundle, String symbolicName, String path, boolean shared)  
{
    URL url = ideBundle.getEntry(path);
    ImageDescriptor desc = ImageDescriptor.createFromURL(url);
    configurer_p.declareImage(symbolicName, desc, shared);
}

希望这一帮助。

感谢!

问题回答

暂无回答




相关问题
Two Eclispse projects -> One Eclipse Plug-in

Background I m a developer of the Vrapper project. Vrapper contains of 2 major parts Vim-emulation library (vrapper.core) Eclipse part that makes a good use of it We want vrapper.core to be ...

Error in Preview of Custom Eclipse refactoring

I am implementing an new eclipse refactoring. This will enable developers to Pull-up the preconditions statements from a child method to the parent method. This all works perfectly when I select "...

Eclipse git checkout (aka, revert)

Is it possible to do the equivalent of git checkout from within Eclipse using the EGit plugin? I have a file that s been modified. I want to discards the changes and revert the file back to what s in ...

Adding jar from Eclipse plugin runtime tab

I want to add .jar files for plugin from the Runtime tab of manifest file. When I use the Add... button, I can see only sub-directories of the plugin project. So if I want to add same .jar file to ...

BlackBerry JDE Eclipse Plugin 1.1 on Windows 7

Has anybody been able to run the new plugin beta v1.1 on Windows 7? When I run the installer, it pops up an error that states "Please select another location to extract the installer to". It ...

How to not write the DocumentRoot to the XML

I m using EMF, and I created my ecore from XSD. I notice that the XML that are being saved by the editor have the element DocumentRoot, which is not part of my original XSD. Can I somehow not ...

How do you fix loading plugins in eclipse 3.5.1 on linux?

I have two linux boxes. Both Fedora 11 x64. On one, I downloaded the eclipse-java-galileo-SR1-linux-gtk-x86_64.tar.gz. I unpacked it to /opt/eclipse-3.5.1/ and used the Install New Software... item ...

热门标签