Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [pde-dev] "Creating an Eclipse plug-in" cheat sheet
  • From: Weber Matthias <Matthias.Weber@xxxxxxxxxxx>
  • Date: Tue, 17 Aug 2021 11:04:39 +0000
  • Accept-language: de-DE, en-US
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=corpuls.com; dmarc=pass action=none header.from=corpuls.com; dkim=pass header.d=corpuls.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=AFHINLmenDVF5XsSYM+1iVuCvwxmx3ey7wTMN/68f7w=; b=bbPGPtgMgHECkjEF2PDUU4xXBBu4XSXEp6anTbNZ8lJfk9/7AIyB6TI+9mau3I9eAHNeCBobgneTm2E2U4QlMAqHsuBv+fRB3K4wSTFbjByEdvhGFQSSOO83L+SKT1xb2GjsPOQcZ/SFmqhft1/ykh9fLYzF2tpfpAT/MaKMhXhA5hsrq/4s5Ui0BAYDJM7frmhPPdJbOAIwFEJz3mWNizRjiLzfoX0ofGkAKmA16Gk7UbwRgQNsfMfextIwyrZaQEv6jttD+fBsjeAvTxK7eTpRvsTbCHjoFUz/bT1mneBwYoGGvKm//CyE6sxMh+svZXPok7/zVYDgcDEN59ZaVA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=TuSPsIZ43cT8j4ynRck7RwXMiMBT31i0i/o5fbsf/bvMJeZSdE6cAv50i4m3gAvCGTzprTsebd4fzUgKmZt0ZjjtAAOCq90LqvLP7PqJxSWw4J7geqvthYWTY/P+WkaTCtkYLeMgFA6OlW1wUy4P9Gu5GwTTT5rDudh3isBf7rT3jMFwB79MluT4FjMbtzJa0QayS3U/BPbXMQqdHZgarlGPiCBpbSKG7HS9MeGaV8O5OrFupDDBkbRYIORLgLFPp+c2iDpfHbC6lDNISIZReqzLjVVPvRZo0Z4jPzyjkj5RxhmrVyqjbPW1F4uGhh+ieSjWvhfELFBNcYKBVCjtJg==
  • Delivered-to: pde-dev@xxxxxxxxxxx
  • List-archive: <https://www.eclipse.org/mailman/private/pde-dev/>
  • List-help: <mailto:pde-dev-request@eclipse.org?subject=help>
  • List-subscribe: <https://www.eclipse.org/mailman/listinfo/pde-dev>, <mailto:pde-dev-request@eclipse.org?subject=subscribe>
  • List-unsubscribe: <https://www.eclipse.org/mailman/options/pde-dev>, <mailto:pde-dev-request@eclipse.org?subject=unsubscribe>
  • Thread-index: AdeOh4B8JKEbsmCTS4+y8vsjacZVTQAMObiAASCJDoAABr5hEA==
  • Thread-topic: [pde-dev] "Creating an Eclipse plug-in" cheat sheet

Hi all,

thank you for your hints - this has been very helpful. I have read the instructions more carefully and it really seems that I've accidentally skipped some steps.

However, I am still a bit stuck adding code for the view class. The instructions say "Add the following lines of code under the pre-generated createPartControl method" but there is no such pre-generated method but only "// TODO Auto-generated constructor stub" instead.

Even "public class SampleView extends ViewPart {" seems to be wrong as I get "the hierarchy of the type SampleView is inconsistent" - unfortunately I am a total Java newbie here.
Am I not allowed to extend the base class ViewPart? If I keep it, I get the following runtime error:
Plug-in "com.example.helloworld" was unable to instantiate class "com.example.helloworld.view.SampleView".

If I remove the "extends ViewPart" snippet, I get another error:
class com.example.helloworld.view.SampleView cannot be cast to class org.eclipse.ui.IViewPart (com.example.helloworld.view.SampleView is in unnamed module of loader org.eclipse.osgi.internal.loader.EquinoxClassLoader @7d72aa8f; org.eclipse.ui.IViewPart is in unnamed module of loader org.eclipse.osgi.internal.loader.EquinoxClassLoader @771fb289)

Any hint is welcome how I get a minimal example of code for a custom view working is very welcome. Please find my example code attached - I've also tried to Lars' demo project into account.

Best regards,
Matthias

-----Ursprüngliche Nachricht-----
Von: pde-dev <pde-dev-bounces@xxxxxxxxxxx> Im Auftrag von Lars Vogel
Gesendet: Dienstag, 17. August 2021 09:36
An: Eclipse PDE general developers list. <pde-dev@xxxxxxxxxxx>
Betreff: Re: [pde-dev] "Creating an Eclipse plug-in" cheat sheet

CAUTION: This email originated from outside your organization. Exercise caution when opening attachments or on clicking links from unknown senders.

Hi Matthias,

have a look at https://www.vogella.com/tutorials/EclipsePlugin/article.html
to learn how to extend the Eclipse IDE.

HTH, Lars

On Wed, Aug 11, 2021 at 3:55 PM Jonah Graham <jonah@xxxxxxxxxxxxxxxx> wrote:
>
> BTW - until the cheat sheet is fixed, I think you have missed a step.
>
> Your screenshot shows you have done the "add a view category", but you need to do "add a view" before you do "create a view class".
>
> HTH,
> Jonah
>
> ~~~
> Jonah Graham
> Kichwa Coders
> www.kichwacoders.com
>
>
> On Wed, 11 Aug 2021 at 04:12, Weber Matthias <Matthias.Weber@xxxxxxxxxxx> wrote:
>>
>> Hi,
>>
>>
>>
>> I’ve been an Eclipse user for several years now, but I am completely new to Eclipse development.
>>
>> Please let me know if I am wrong here and my questions should be directed to some other kind of support channel (forum, other mailing list, etc).
>>
>>
>>
>> I want to understand the development of Eclipse plug-ins and have therefore stumbled across the Eclipse PDE and this mailing list. I’ve started working through the Cheat Sheets and am already stuck with the “Create a plug-in extension”: I cannot perform the “Create a view class” step as I do not see any hyperlink labelled "class" in the Extension Element Details.
>>
>>
>>
>> From the  Cheat Sheet:
>>
>> >To create a view class, perform the following steps:
>>
>> >Click the "class" hyperlink under "Extension Element Details" to 
>> >start the "New Java Class" wizard
>>
>>
>>
>> The Eclipse SDK I am using is: Version: 2021-06 (4.20), Build id: 
>> I20210611-1600
>>
>>
>>
>> Best regards,
>>
>> Matthias
>>
>>
>>
>> _______________________________________________
>> pde-dev mailing list
>> pde-dev@xxxxxxxxxxx
>> To unsubscribe from this list, visit 
>> https://www.eclipse.org/mailman/listinfo/pde-dev
>
> _______________________________________________
> pde-dev mailing list
> pde-dev@xxxxxxxxxxx
> To unsubscribe from this list, visit 
> https://www.eclipse.org/mailman/listinfo/pde-dev



--
Eclipse Platform project co-lead
CEO vogella GmbH

Haindaalwisch 17a, 22395 Hamburg
Amtsgericht Hamburg: HRB 127058
Geschäftsführer: Lars Vogel, Jennifer Nerlich de Vogel
USt-IdNr.: DE284122352
Fax (040) 5247 6322, Email: lars.vogel@xxxxxxxxxxx, Web: http://www.vogella.com _______________________________________________
pde-dev mailing list
pde-dev@xxxxxxxxxxx
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/pde-dev

Attachment: SampleView.java
Description: SampleView.java


Back to the top