dicle
dicle

Reputation: 1162

How to make dynamic or update name on Eclipse plug-in?

Is there any way to update/change org.eclipse.ui.views extension point's view name from java side ?

   <extension point="org.eclipse.ui.views">
   <category
        id="my.ui"
        name="My app name">
   </category>
   <view
        category="my.ui"
        class="com.ui.control.ControlView"
        id="my.ui.controlView"
        inject="true"
        icon="icons/icon.ico"
        name="Dynamic Name"> --this part i want to update from java side
   </view>

Upvotes: 0

Views: 62

Answers (1)

greg-449
greg-449

Reputation: 111217

You normally do this in the ViewPart class (com.ui.control.ControlView in your example) by calling the setPartName method:

protected void setPartName(String partName)

The default value for the name is taken directly from the name field in the IConfigurationElement for the extension point so it can't be changed (see org.eclipse.ui.part.WorkbenchPart#setInitializationData)

Upvotes: 1

Related Questions