Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » Not able to add view to IDE(I'm trying to add view to the existing plugin, after adding view in pom.xml file also view is not reflecting.)
Not able to add view to IDE [message #1827924] Wed, 27 May 2020 05:45 Go to next message
vidya tcFriend
Messages: 9
Registered: January 2020
Location: bangalore
Junior Member
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 Go to previous messageGo to next message
Rolf Theunissen is currently offline Rolf TheunissenFriend
Messages: 260
Registered: April 2012
Senior Member
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 #1827974 is a reply to message #1827935] Thu, 28 May 2020 05:29 Go to previous messageGo to next message
vidya tcFriend
Messages: 9
Registered: January 2020
Location: bangalore
Junior Member
I just wanted to create a sample view for the existing plugin, can you please suggest me any tutorial/resource for the same.


Thanks.
Re: Not able to add view to IDE [message #1827981 is a reply to message #1827974] Thu, 28 May 2020 08:36 Go to previous messageGo to next message
Rolf Theunissen is currently offline Rolf TheunissenFriend
Messages: 260
Registered: April 2012
Senior Member
Still no clue of what you are trying to do.

If it that you are trying to programmatically open a (predefined) view, have a look at the following:
https://stackoverflow.com/questions/171824/programmatically-showing-a-view-from-an-eclipse-plug-in
Re: Not able to add view to IDE [message #1828007 is a reply to message #1827981] Fri, 29 May 2020 05:09 Go to previous messageGo to next message
vidya tcFriend
Messages: 9
Registered: January 2020
Location: bangalore
Junior Member
index.php/fa/38206/0/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 Go to previous messageGo to next message
vidya tcFriend
Messages: 9
Registered: January 2020
Location: bangalore
Junior Member
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

https://attachments.office.net/owa/vidya.tc%40exaleapsemi.com/service.svc/s/GetAttachmentThumbnail?id=AAMkAGIxMDA0YTA5LTEyNDctNDEwZi04NTFmLTM1NDYyZTlmYWM2YgBGAAAAAADy5KUr1ftpSaymbCf%2BCt0%2BBwBMkv99CiDeSbs0RZjtSsS1AAAAAAEMAABMkv99CiDeSbs0RZjtSsS1AACQ4MVpAAABEgAQAIScMNmiUYdOsa3nUNDpL%2Fg%3D&thumbnailType=2&owa=outlook.office.com&scriptVer=2020051702.05&X-OWA-CANARY=yKhv3VOW-0-JhRq6Bj0gDsDOsvivA9gYHmj2YqABzn3kprLhS_kThHB30eJeShWDqtcMAq5taVM.&token=eyJhbGciOiJSUzI1NiIsImtpZCI6IjU2MzU4ODUyMzRCOTI1MkRERTAwNTc2NkQ5RDlGMjc2NTY1RjYzRTIiLCJ4NXQiOiJWaldJVWpTNUpTM2VBRmRtMmRueWRsWmZZLUkiLCJ0eXAiOiJKV1QifQ.eyJvcmlnaW4iOiJodHRwczovL291dGxvb2sub2ZmaWNlLmNvbSIsInVjIjoiMGRjNmVkZjcxZDU5NDYxNDlkNjYwYmY4YTZjNGNjMDgiLCJzaWduaW5fc3RhdGUiOiJ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ApuG9w-91Ur30nK8wYTVPLGNUdcsc7AXp-uoaPDQ9t5vzWUde8WiHlw&animation=true

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

Re: Not able to add view to IDE [message #1828025 is a reply to message #1828021] Fri, 29 May 2020 11:19 Go to previous message
Rolf Theunissen is currently offline Rolf TheunissenFriend
Messages: 260
Registered: April 2012
Senior Member
You are trying to 'create an Eclipse view' (google around for many examples)

The code inside your InstalledSDKView class will never create a view, this is code for creating a standalone application.

Have a look at tutorials:
https://wiki.eclipse.org/FAQ_How_do_I_create_my_own_view%3F
https://help.eclipse.org/2020-03/index.jsp?topic=%2Forg.eclipse.platform.doc.isv%2Fguide%2Ffirstplugin.htm
https://www.eclipse.org/articles/viewArticle/ViewArticle2.html

Probably you want to know about perspectives too:
https://www.eclipse.org/articles/using-perspectives/PerspectiveArticle.html
Previous Topic:Problem while launching RCP application as using .product file.
Next Topic:grid table Toolbar items not getting visible
Goto Forum:
  


Current Time: Sun Dec 08 10:33:08 GMT 2024

Powered by FUDForum. Page generated in 0.03250 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top