Not able to add view to IDE [message #1827924] |
Wed, 27 May 2020 05:45  |
Eclipse User |
|
|
|
firstly i tried creating a view with new plugin and i was able to create the view, but i'm failing to create view for existing plugin with same procedure.
|
|
|
Re: Not able to add view to IDE [message #1827935 is a reply to message #1827924] |
Wed, 27 May 2020 08:36   |
Eclipse User |
|
|
|
From this one liner, I have no clue what you are trying to do. Also, I don't see the relation between a pom.xml (a maven build artifact) and creating views.
If you want some feedback, please provide more details what you are trying to accomplish, and what you already tried to do to accomplish that.
|
|
|
|
|
Re: Not able to add view to IDE [message #1828007 is a reply to message #1827981] |
Fri, 29 May 2020 05:09   |
Eclipse User |
|
|
|
hi,
I am trying to create a sample view (windows > show view > sample view) for the existing plugin,
----------------------------------------------------------------------------------------------
since i wanted to add a view to an existing plug-in, i edited the plugin.xml with the Manifest Editor, and in the Extensions tab i added Extension Templates by choosing Sample View.
Edited Plugin.xml :
<extension
point="org.eclipse.ui.views">
<category
id="com.example.cdt.plugin"
name="Sample Category">
</category>
<view
category="com.example.cdt.plugin"
class="com.example.cdt.plugin.views.SampleView"
icon="$nl$/icons/sample.png"
id="com.example.cdt.plugin.views.SampleView"
inject="true"
name="Sample View">
</view>
</extension>
---------------------------------------------------------------------------------------
I tried this procedure for new plugin and i was able to create the view (Image attached)
PS: Installed SDK is the view i have created.
Thank you.
|
|
|
Re: Not able to add view to IDE [message #1828021 is a reply to message #1828007] |
Fri, 29 May 2020 09:21   |
Eclipse User |
|
|
|
Sorry for not providing the full details.
We are working on a custom IDE based on Eclipse CDT. It is required that a new "custom view" be added.
For instance:
Just like the red-colored "Installed-SDK view" in the image

Following 2 things are tried:
1.With Extension
In the Extensions tab, I added Extension Templates by choosing Sample View.
2. In Plugin.xml :
plugin.xml snippet:
<extension
point="org.eclipse.ui.views">
<category
id="com.exaleap.cdt.plugin"
name="SDK category">
</category>
<view
category="com.exaleap.cdt.plugin"
class="com.exaleap.cdt.plugin.views.InstalledSDKView"
icon="$nl$/icons/sample.png"
id="com.exaleap.cdt.plugin.views.InstalledSDKView"
inject="true"
name="Installed SDK View">
</view>
</extension
2a).To get list box:
Updated InstalledSDKView.java file and checked
import org.eclipse.swt.SWT;
import org.eclipse.swt.layout.*;
import org.eclipse.swt.widgets.*;
public class InstalledSDKView {
public static void main(String[] args) {
Display display = new Display();
Shell shell = new Shell(display);
shell.setLayout(new GridLayout(3, true));
// Create three checkboxes
new Button(shell, SWT.CHECK).setText("Checkbox 1");
new Button(shell, SWT.CHECK).setText("Checkbox 2");
new Button(shell, SWT.CHECK).setText("Checkbox 3");
shell.pack();
shell.open();
while (!shell.isDisposed()) {
if (!display.readAndDispatch()) {
display.sleep();
}
}
display.dispose();
}
}
Output
======
Changes are not reflected.
Am I missing anything? Are there new approaches we can try to achieve this?
Thanks
|
|
|
|
Powered by
FUDForum. Page generated in 0.04938 seconds