New NetBeans Plugin: Issue Tracking Project Support

2013-09-11 4 comments

Last week I released a new plugin for the NetBeans IDE called Issue Tracking Project Support. This plugin offers you a better integration of Issue Trackers with NetBeans Projects. It maps a NetBeans Project to an Issue Tracking Repository.

Features in this first pre-release:

  • All registered Issue Tracker providers within the NetBeans IDE are supported.
  • There’s a new category “Issue Tracker” in the Project Properties panel:
    ProjectProperties-StandaloneModule-OSX-V0.1
  • The Issue Tracking settings can be inherited from the parent project if the project is a sub project, e.g. a Suite Module project which has a parent Module Suite project:
    ProjectProperties-SubModule-OSX-V0.1 ProjectProperties-SuiteModule-ParentSettings-OSX-V0.1
  • After enabling the feature in the Project Properties, an additional sub menu is added to the project’s context menu. Some Issue Tracker basic actions are available as well as additional actions like “Recent Issues”:
    ProjectContextMenu-OSX-V0.1
  • Currently only NetBeans Plattform Module and Suite Projects are supported. In future other project types like Maven Projects will be implemented.

Installation

You can download this plugin from the NetBeans Plugin Portal here and install it manually using Tools > Plugins > Downloaded > Add Plugins…

Custom Properties in NB Platform Application Config File (app.conf)

Since NetBeans V6.9 there’s a new property app.conf (project.properties) to configure a custom application configuration file. Geertjan wrote about that.

The default configuration file (from harness/etc/app.conf) looks like this (some lines are omitted):

# ${HOME} will be replaced by user home directory according to platform
default_userdir="${HOME}/.${APPNAME}/dev"

# options used by the launcher by default, can be overridden by explicit
# command line switches
default_options="--branding ${branding.token} -J-Xms24m -J-Xmx64m"

Unfortunately, only the property branding.token is supported by the Ant distribution task! But I want include other well known properties like app.version to my custom configuration file to define default_userdir more flexible like

# ${HOME} will be replaced by user home directory according to platform
default_userdir="${HOME}/.${APPNAME}/${app.version}"

To achieve this, only a small patch in the build.xml is needed. I have to override the Ant target “build-launchers” (from harness/suite.xml):

<project name="MyApp" basedir=".">
   ...
   <target name="build-launchers" depends="suite.build-launchers">
      <replace file="${build.launcher.dir}/etc/${app.name}.conf" 
               token="$${app.version}" value="${app.version}"/>
   </target>
</project>

Now when I run the ZIP target, my own configuration file is used and the application version property is replaced by the value from the project.properties:

# ${HOME} will be replaced by user home directory according to platform
default_userdir="${HOME}/.${APPNAME}/1.1"
Categories: Java, NB Platform, NetBeans Tags: ,

RedmineNB V1.1 for NetBeans 7.2.1 released

2012-10-29 13 comments

RedmineNB V1.1 has been just released. It includes new features and many bugfixes for the V1.0.x releases. Since RedmineNB has an implementation dependency to the Issue Tracking module, this version is only compatible with the NetBeans IDE 7.2.1 (Build 201210100934).

A Redmine V1.3+ installation is recommended for best compatibility (tested against Redmine V2.1.0). There are some limitations in the functionality since the used Redmine REST API is not yet fully developed. This page gives an overview of the Redmine REST API functionality.

Find Issues panel

What’s New?

RedmineNB V1.1 includes many bug fixes and improvements. The changes includes:

Screenshots

There’s a new Redmine Wiki markup viewer for the issue description. The implementation (still a prototype) is based on Mylyn WikiText to converting the Textile markup to HTML. For HTML rendering the capabilities of the Swing JLabel component is used.

SubTask Issue Detail panel

 

An issue listed as Action Item using the toggle button in the upper right toolbar:

Notes

Links

Categories: Java, NetBeans, Redmine

RedmineNB V1.0-Beta (Update)

2012-04-19 33 comments

The V1.0 Beta release of the RedmineNB Plugin for NetBeans is available. RedmineNB adds support for Redmine issue tracker (Version 1.3.0+) to NetBeans and is built on top of the redmine-java-api library.

Many bug fixes and several improvements are featured in the Beta release:

  • [REDMINENB-1] – New Issue: Casting exception leads to messed up UI
  • [REDMINENB-2] – Update issue: Hours cast Long->Double exception
  • [REDMINENB-6] – Implement add comment (used from commit dialog box)
  • [REDMINENB-7] – Class Cast Exception makes UI unusable
  • [REDMINENB-11] – Can’t create Redmine issue tracker
  • [REDMINENB-16] – Exception occurs when specifying parent task number
  • [REDMINENB-3] – Update issue: Give feedback when successfully updated
  • [REDMINENB-19] – Add Update Center

Since RedmineNB has an implementation dependency to the Issue Tracking module the plugin is only compatible with NetBeans 7.1.1. A Redmine V1.3.0+ installation is required for best compatibility (tested with V1.3.1 and V1.4.0). There are some limitations in the functionality since the used Redmine REST API is not yet fully developed.

The plugin can be downloaded from the RedmineNB project@kenai or installed by the new Update Center:

The downloaded distribution also installs the Update Center for automatically receive updates. For more information please consult the project’s Wiki. Please report bugs and feature request in the project’s JIRA.

Please note that RedmineNB is still under development and not intended for production use.

Update (2012-04-25):

The “Can’t find resource for bundle …”-Problem has been fixed with Version 1.0.7 (available fron the Update Center).

Toolbar buttons with label

2012-04-16 6 comments

As default, any action in a NetBeans toolbar is displayed with an icon only. If you want to show also a label for a desired action you have to implement a Presenter.TOOLBAR. If you don’t want do this for each action, register a custom org.openide.awt.Actions.ButtonActionConnector like this:

/**
 * @see org.openide.awt.Actions#connect(AbstractButton, Action)
 */
@ServiceProvider(service = ButtonActionConnector.class, position = 100)
public class MyButtonActionConnector implements ButtonActionConnector {

   @Override
   public boolean connect(AbstractButton button, Action action) {
      String text = (String)action.getValue("menuText"); // NOI18N
      if (text != null) {
         button.setAction(action);
         button.setText(Actions.cutAmpersand(text));
         String desc = (String)action.getValue(Action.SHORT_DESCRIPTION);
         if (desc != null) {
            button.setToolTipText(desc);
         } else {
            button.setToolTipText((String)action.getValue(Action.NAME));
         }
         return true;
      }
      return false;
   }

   @Override
   public boolean connect(JMenuItem item, Action action, boolean popup) {
      return false; // use default implementation
   }
}

If the property menuText is set, the the button is configured with icon and text. The basic use of the menuText Property is (copied from @ActionRegistration‘s javadoc):

Provides the JMenuItem text if one wants to use other than the name of the action returned by ActionRegistration.displayName().

With the custom ButtonActionConnector this property is “extended” to show a toolbar button text if supplied.

Provide a value for the @ActionRegistration’s menuText Attribute for the desired action(s):

@ActionRegistration(displayName = "#CTL_PwdChangeAction",
                    menuText = "#CTL_PwdChangeAction",
                    iconBase = "resources/key.png")
@ActionReference(path = "Toolbars/User")
@Messages("CTL_PwdChangeAction=Change Password…")
public final class PwdChangeAction implements ActionListener {
   ...
}

Result:

or

Tested with NetBeans 7.1.1 (see comments)

Fastest way to clear the Lookup contents

Suppose you have an AbstractLookup with a registered InstanceContent:

InstanceContent ic = new InstanceContent();
Lookup lkp = new AbstractLookup(ic);

The fastest way to clear all the Lookup contents:

ic.set(Collections.emptyList(), null);

Now I’m looking for a convenience command to remove all instances of a given type. I want to replace this code:

for (MyClass my : lkp.lookupAll(MyClass.class)) {  
   ic.remove(my);
}

Perhaps someone has an idea?

Categories: Java, NB Platform, NetBeans Tags:

Redmine Plugin for NetBeans

The RedmineNB dev team is pleased to announce the first alpha release of the RedmineNB Plugin for NetBeans. RedmineNB adds support for Redmine issue tracker (Version 1.3.0+) to NetBeans and is built on top of the redmine-java-api library (V1.8.0).

Since RedmineNB has an implementation dependency to the Issue Tracking module the plugin is only compatible with NetBeans 7.1.1. A Redmine V1.3.0+ installation is required for best compatibility (tested with V1.3.1). There are some limitations in the functionality since the used Redmine REST API is not yet fully developed. This page gives an overview of the Redmine REST API.

The plugin can be downloaded from the RedmineNB project@kenai and for more information consult the project’s Wiki. Please note that RedmineNB is still under development and not yet intended for production use.

Categories: Java, NetBeans, Redmine Tags: , ,
Follow

Get every new post delivered to your Inbox.