Re: I am unable to verify my plugin

Peter Cheung <[email protected]> Sun, 16 Apr 2017 08:01:22 +0000
Newsgroups gmane.comp.java.netbeans.modules.openide.devel
Message-ID <HKNPR04MB05161DF506623F1D062B2FD2B5070@HKNPR04MB0516.apcprd04.prod.outlook.com>
So far, that is the only one way I got to read out editor-bookmark information.

Peter.


________________________________
From: geertjan wielenga <[email protected]>
Sent: Sunday, April 16, 2017 12:52 PM
To: [email protected]
Subject: [platform-dev] Re: I am unable to verify my plugin



What's the reason you need to use an implementation dependency?


Gj

On 16-4-2017 6:50, Peter Cheung wrote:

So what can I do? embed the whole source code of that into my plugin?

thx

________________________________
From: geertjan wielenga <[email protected]><mailto:[email protected]>
Sent: Sunday, April 16, 2017 1:24 AM
To: [email protected]<mailto:[email protected]>
Subject: [platform-dev] Re: I am unable to verify my plugin



Yes, this indicated an implementation dependency:

<explicitValue>org.netbeans.modules.editor.bookmarks/1 >= 1.37.l</explicitValue>


And therefore it will not be permitted in the Plugin Portal. That's a hard dependency on a specific version of the plugin, which will not necessarily be in the official release of NetBeans for which you've developed the plugin.


Gj

On 15-4-2017 18:29, Peter Cheung wrote:

If I have this in pom.xml, "Install/Reload in dev" works, but plugin central said "Plugin has hard dependency to other modules defined in info.xml module descriptor, therefore can't be subject of verification"


<moduleDependencies>

<dependency>

<id>org.netbeans.modules:org-netbeans-modules-editor-bookmarks</id>

<type>impl</type>

</dependency>

</moduleDependencies>


If I have changed to this, plugin central won't complaint but "Install/Reload in dev" doesn't works


<moduleDependencies>

<dependency>

<id>org.netbeans.modules:org-netbeans-modules-editor-bookmarks</id>

<type>impl</type>

<explicitValue>org.netbeans.modules.editor.bookmarks/1 >= 1.37.l</explicitValue>

</dependency>

</moduleDependencies>

!!! Click "run" is just same case.

Thanks, I know I am too disturb, sorry

________________________________
From: geertjan wielenga <[email protected]><mailto:[email protected]>
Sent: Sunday, April 16, 2017 12:20 AM
To: [email protected]<mailto:[email protected]>
Subject: [platform-dev] Re: I am unable to verify my plugin



On 15-4-2017 18:10, mcheung63 wrote:
> The tutorial on web teach me to click "Install/Reload in Development plugin" to debug.

You don't need to do that at all to debug. You can deploy your plugin
from NetBeans to a fresh instance of NetBeans, i.e., right-click the
project and click Run.


>   This step work perfectly,

But in the previous e-mail, you said that you get the error message
"NetBeans: Error redeploying NBM module in development IDE." when you
click "Install/Reload in Development IDE".

So, how can it work perfectly?

And, you really don't need to install any plugin via "Install/Reload in
Development IDE". Just right-click, choose Run, and a new instance of
NetBeans will start with your plugin installed into it and there you can
try it out (is that what you mean by "debug")?

I don't understand. Too many questions.

Gj

>   but when I pack my plugin into NBM and submit to plugin central. It either said, I use hard dependency so don't let me verify OR the plugin crash, can't load the BookmarkList class (https://github.com/mcheung63/netbeans-minimap/issues/8) . I am sure this bug exist because I installed a clean netbeans in VM to test my plugin.
>
> All I want to do is read out the bookmarks line numbers, so I have to use "org-netbeans-modules-editor-bookmarks", but just can't make it works.
>
> Steps to produce:
> 1) git clone https://github.com/mcheung63/netbeans-minimap.git
> 2) right click project, click "clean and build", it should success
> 3) click "Install/Reload in Development plugin" OR "Run project", it said "NetBeans: Error redeploying NBM module in development IDE."
>
> Below are the code I read out bookmark information
>
> Code:
>
> BookmarkList bookmarkList = (BookmarkList) document.getProperty(BookmarkList.class);
> isBookmarkLine(bookmarkList, 1);
>
> boolean isBookmarkLine(BookmarkList bookmarkList, int lineNo) {
>                if (bookmarkList == null) {
>                        return false;
>                }
>                for (Bookmark bookmark : bookmarkList.getBookmarks()) {
>                        if (bookmark.getLineNumber() == lineNo) {
>                                return true;
>                        }
>                }
>                return false;
>        }
>
>
>
> Thanks
> Peter
>
>
>
>