swt - Avoid duplication of toolbar item in eclipse -


I have created a toolbar object using Eclipse menu contributes and commands. Using Eclipse Command Core Expressions, I have enforced orders for two views ( activePARTID is viewA or viewB ). There is a provision to open viewA from viewB .

Since I have commanded both ideas, when I try to open from ViewB to viewA , Toolbar object appears twice How to avoid showing in more than one toolbar in the toolbar.

Anyhelp is appreciated.

  & lt; Extension point = "org.eclipse.ui.menus" & gt; & Lt; MenuContribution allPopups = "false" locationURI = "toolbar: org.eclipse.ui.main.toolbar? After = additional" & gt; & Lt; Toolbar ID = "& lt; xyz> .toolbar" & gt; & Lt; Command Command Id = "xyz.abc" icon = "icon / db.jpg" id = "ABC" label = "ABC" style = "push" tooltip = "ABC" & gt; & Lt; Appears when check enabled = "wrong" & gt; & Lt; And & gt; & Lt; Variable = "activeWorkbenchWindow.activePerspective" & gt; & Lt; Equal value = "xyz.perspective" & gt; & Lt; Is equal to / & gt; & Lt; / With & gt; & Lt; With variable = "activePartId" & gt; & Lt; Or & gt; & Lt; Equal value = "visible a" & gt; & Lt; Is equal to / & gt; & Lt; Equal value = "view" and gt; & Lt; Is equal to / & gt; & Lt; / Or & gt; & Lt; / With & gt; & Lt; / And & gt; & Lt; / VisibleWhen & gt; & Lt; / Order & gt; & Lt; / Toolbar & gt; & Lt; / MenuContribution & gt; & Lt; Expansion Points & gt;  

Thanks,
satisfaction


Comments

Popular posts from this blog

Pass DB Connection parameters to a Kettle a.k.a PDI table Input step dynamically from Excel -

multithreading - PhantomJS-Node in a for Loop -

c++ - MATLAB .m file to .mex file using Matlab Compiler -