
Sunday May 21, 2006
TIP: Images in Tooltips
Here is a simple tip:
The Swing tooltips support html syntax via use of the <html> tag. This can be exploited to show images in tooltips.
For example, with the following layout:
src
org
mypackage
ImageInTooltip.java
tooltip.gif
and source code:
package org.mypackage;
import javax.swing.JFrame;
import javax.swing.JLabel;
public class ImageInTooltip {
public static void main(String[] args) {
JFrame frame = new JFrame();
JLabel label = new JLabel("Label with image in Tooltip!");
label.setToolTipText(
"<html><img src=\"" +
ImageInTooltip.class.getResource("tooltip.gif") +
"\"> Tooltip "
);
label.setHorizontalAlignment(JLabel.CENTER);
frame.setContentPane(label);
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.setBounds(100, 100, 200, 100);
frame.setVisible(true);
}
}
give you this:
Posted by sandipchitale
( May 21 2006, 04:59:23 PM PDT ) Permalink
UPDATED: Code Template Tools Module
I have updated the Code Template Tools Module on my NetBeans 5.0 update center described
(here).
What is new?
A new generalized code template parameter ${input-parameter name ...} :
${input-parameter name prompt="prompt string"
defaultValue="value1" valuesSeparator="," enumeratedValues="value1,value2,value3" suggestedValues="value1,value2,value3"}
- The user will be be prompted to enter the value of the parameter.
The parameter name part (excluding the input- prefix is used
as the default prompt and default value. The values of input-...
parameters can be strictly constrained using the enumeratedValues
hint. The values of input-...
parameters can be loosely constrained using the suggestedValues
hint. The values separator can be specified using valuesSeparator regexp hint.
DISCLAIMER: This module is experimental. So no guarantees. Use the module at your own risk.
Posted by sandipchitale
( May 21 2006, 08:51:56 AM PDT ) Permalink

Saturday May 20, 2006
UPDATED: JPDA (Java) Debugger Call Stack View Enhancements Module
I have updated the JPDA (Java) Debugger Call Stack View Module on my NetBeans 5.0 update center described (here).
What is new?
Basically made the column structure based on the same principle as the JPDA (Java) Debugger Locals View Enhancements Module. Added the following columns to the call stack view.
- Modifiers - this columns displays the modifiers of the method
associated with the stack frame.
- Method - this columns displays the name, parameters and
return type of the method associated with the stack frame.
- Declaring Class - this column displays the class declaring
the method associated with the stack frame.
- this Class - this column displays the class of
this variable associated with the non-static stack frame.
Note: The class of this may be different from the Declaring class.
- Location Path - when available this column displays the
full path of the location of the method associated with the stack frame.
DISCLAIMER: This module is experimental. So no guarantees. Use the module at your own risk.
Posted by sandipchitale
( May 20 2006, 11:19:15 AM PDT ) Permalink

Thursday May 18, 2006
DONE: NetBeansTM 5.0: Plug-in Development Lab at JavaOne 2006 (Session ID LAB-5106)
Today we conducted the NetBeansTM 5.0: Plug-in Development Lab at JavaOne 2006 (Session ID LAB-5106).
In yesterday's blog I mentioned that the lab documents are available here:
NetBeansTM 5.0: Plug-in Development
I forgot to mentions that the zip file contains the completed NetBeansTM module projects so that you can download and play with them. See the project netbeansplugin\exercises\exercise3-completed\DesktopIntegration inside the zip file which incorporates all three exercises of the lab.
Posted by sandipchitale
( May 18 2006, 08:23:50 PM PDT ) Permalink

Wednesday May 17, 2006
NetBeansTM 5.0: Plug-in Development Lab at JavaOne 2006 (Session ID LAB-5106)
I will be conducting the NetBeansTM 5.0: Plug-in Development lab (Session ID LAB-5106) on Thursday, May, 18th, 2006 from 11:30 am to 1:00 pm . Sorry, the lab is already full. However you can get the lab document and related material here:
NetBeansTM 5.0: Plug-in Development
and try the lab out at home, yourself. You can come and meet me outside the hands on lab room - Moscone Center Hall E 130/131 after the lab (after 1:00 pm). I will be happy to answer your Netbeans module development related questions.
My collegues Devanada Jayaraman and Sakthivel Gopal will be conducting the lab with me.
Posted by sandipchitale
( May 17 2006, 05:21:31 AM PDT ) Permalink

Monday May 08, 2006
Code Template Tools module now supports ${clipboard-content} parameter
${clipboard-content} - If the clipboard had any text, that text will be inserted at the location of ${clipboard-content} parameter. Use ${clipboard-content editable=false} to prevent editing of inserted text.
For example:
With template definition:
_hyperlink=<a href="${clipboard-content editable=false}" target="_blank">${selection editable=false}</a>
And the text:
Netbeans.org
selected in the editor and text:
http://www.netbeans.org
in the clipboard, inserting template _hyperlink results in
<a href="http://www.netbeans.org/" target="_blank">Netbeans.org</a>
Also the paste register functionality is implemented as template insertion allowing the substitution of ${...} parameters. See this entry for details.
Get it from my NetBeans 5.0 update center described (here).
DISCLAIMER: This module is experimental. So no guarantees. Use the module at your own risk.
Posted by sandipchitale
( May 08 2006, 01:31:38 PM PDT ) Permalink

Saturday May 06, 2006
JPDA (Java) Debugger Call Stack View and Locals View Enhancements Modules updated
I have updated the JPDA (Java) Debugger Call Stack View and Locals View Enhancements Modules on my NetBeans 5.0 update center described (here).
What is New?
JPDA (Java) Debugger Call Stack View Enhancements Modules
The Call Stack view now shows the custom icons (similar to Navigator window) for methods and constructors based on the public, protected, private, (package) and static qualifiers. This behaviour can be turned off by setting the system property: -Dorg.netbeans.modules.debugger.callstackviewenhancements.dontShowCustomIcons=true
The Location column now shows the full location (file path or URL) when available.
JPDA (Java) Debugger Call Stack View Enhancements Modules
The Locals view now shows the custom icons (similar to Navigator window) for fields based on the public, protected, private, (package) and static qualifiers. This behaviour can be turned off by setting the system property: -Dorg.netbeans.modules.debugger.localsviewenhancements.dontShowCustomIcons=true.
Also there are some minor bug fixes.
DISCLAIMER: This module is experimental. So no guarantees. Use the module at your own risk.
Posted by sandipchitale
( May 06 2006, 10:55:55 AM PDT ) Permalink

Tuesday May 02, 2006
JPDA (Java) Debugger Call Stack View Enhancements Module uploded
I have uploaded the JPDA (Java) Debugger Call Stack View Enhancements Module to my NetBeans 5.0 update center described (here).
Features
This module enhances the Call Stack View of JPDA (Java) Debugger by showing the class of this
variable when it differs from the class declaring the method associated with the stack frame. This happens when the method is
not overridden in the class of this variable. It is possible to jump to the source of class of
this variable using the Go to Type of this pop up action. Popup actions to jump to (distinct) types of
local variables associated with the call stack frame are also available in the pop up actions.
Example
The following image shows a Java class javaApplication11.SubMain which extends javaApplication11.Main being debugged.
The debugger has stopped at a line in super classes constructor. The type of this variable for the first stack frame is
javaApplication11.SubMain however the associated constructor is that of javaApplication11.Main. That is what the
label of the stack frame is showing. Also note the action to jump to the class of this variable and to (distinct) types of local variables in the context of that frame. The javaApplication11.Main class constructor happens to have local variables of declared and actual types java.util.List and java.util.ArrayList.
Sources
DISCLAIMER: This module is experimental. So no guarantees. Use the module at your own risk.
Posted by sandipchitale
( May 02 2006, 09:35:08 PM PDT ) Permalink

Monday May 01, 2006
JPDA (Java) Debugger Locals View Enhancements Module updated
JPDA (Java) Debugger Locals View Enhancements Module now supports following popup actions:
- Go to Type - Go to source file of the actual type of the field.
- Go to Declared Type - Go to source file of the declared type of the field.
Posted by sandipchitale
( May 01 2006, 08:16:26 PM PDT ) Permalink
JPDA (Java) Debugger Locals View Enhancements Module uploded
I have uploaded the JPDA (Java) Debugger Locals View Enhancements Module to my NetBeans 5.0 update center described (here).
Features
This module enhances the Locals View of JPDA (Java) Debugger by adding the following columns:
- Modifiers - this columns displays the modifiers of field in Locals View.
- Declared Type - this column displays the declared type of the field in Locals View.
- Declared In - this column displays the class in which the field in Locals View is declared.
How to use
Simply debug any Java application. You should see the above additional column in the Local Variables view.
Example
The following image shows a Java class javaApplication11.Main being debugged.
The debugger has stopped at a line in it's constructor.
The following image shows the enahanced Local Variables view.
Notice that the actual type of field javaApplication11.Main.o is Properties (Type column).
The declared type of field javaApplication11.Main.o is Object (Declared Type column).
Also notice the Modifiers and Declared In columns.
TODO:
- Action to jump to the Actual type.
- Action to jump to the Declared type.
This module demonstrates how to extend the Netbeans debugger.
Sources
DISCLAIMER: This module is experimental. So no guarantees. Use the module at your own risk.
Posted by sandipchitale
( May 01 2006, 10:27:43 AM PDT ) Permalink
|