简体   繁体   中英

Application runtime about eclipse RCP

I declared some coolbar like this in one plugin:

     <menuContribution
           locationURI="toolbar:org.eclipse.ui.main.toolbar?after=additions">
        <toolbar
              id="coolbar.toolbars.Save">
           <command
                 commandId="coolbar.commands.save"
                 icon="image/CoorBarPic/save_edit.gif"
                 id="coolbar.toolbars.sampleCommand"
                 style="push"
                 tooltip="save">
           </command>
        </toolbar>
     </menuContribution>

when I run my application first time ,it looks like this:

but when I run the same application second time it become like this:

sorry my reputation is not enough ,i can't post picture here , But I can
describe the problem . First time the coolbar appear at Left of the coorbarline Second time all coolbars will appear after the perspectiveBar at the right side of the coorbarline

the coolbars location has changed.

I run my eclipse rcp application ,it will generate a folder named "workspace" at application relative path, I know this folder is useful with workbench creation process.In path "workspace.metadata.plugins\\org.eclipse.e4.workbench" there is a file named "workbench.xmi" ,this file may saved the layout of the workbench . if I delete this file and run again , the coolbars location will correct. but Idon't want delete this file every time ,because it also save the user's habit .

I declared coolbars in plugin A, the workbench and perspective are in plugin B

what cause this situation appear,and how can I fix it .

My Eclipse plugin build version is 3.5 or greater

This problem has

Thaks for your help.

You should configure where your workspace is located. Then check what happens when your app is closing.

Digging workspace internal structure may help your leaning, but not developing your app.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM