This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
}
// @EditorActionRegistration(
@EditorActionRegistration(
// name = buildToolTipAction,
name = buildToolTipAction,
// shortDescription = editorBundleHash + buildToolTipAction
shortDescription = editorBundleHash + buildToolTipAction
// )
)
public static class BuildToolTipAction extends BaseAction {
static final long serialVersionUID =-2701131863705941250L;
<!-- ACTUAL CHANGES BEGIN HERE: -->
<changes>
<change id="EditorActionRegistration-weight">
<summary>Add "weight" attribute to EditorActionRegistration.</summary>
<version major="1" minor="53"/>
<date day="14" month="11" year="2011"/>
<author login="mmetelka"/>
<compatibility binary="compatible" source="compatible" semantic="compatible" addition="yes"/>
<description>
<p>
Add "weight" attribute to EditorActionRegistration annotation
to allow for a clean actions overriding.
</p>
</description>
<issue number="199823"/>
</change>
<change id="zoom-text-action-names-added">
<summary>Zoom text actions added</summary>
<version major="1" minor="45"/>
Manifest-Version: 1.0
OpenIDE-Module: org.netbeans.modules.editor.lib2/1
OpenIDE-Module-Implementation-Version: 24
OpenIDE-Module-Implementation-Version: 25
OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/editor/lib2/Bundle.properties
OpenIDE-Module-Layer: org/netbeans/modules/editor/lib2/resources/layer.xml
OpenIDE-Module-Needs: org.netbeans.modules.editor.actions
is.autoload=true
javac.source=1.6
javac.compilerargs=-Xlint:unchecked
spec.version.base=1.52.0
spec.version.base=1.53.0
javadoc.arch=${basedir}/arch.xml
javadoc.apichanges=${basedir}/apichanges.xml
* global mime-lookup <code>MimeLookup.getLookup(MimePath.EMPTY)</code>.
*/
String preferencesKey() default "";
/**
* Allows to make an override of an action by adding a "weight" attribute
* into a generated file object (in the system filesystem).
* <a href="http://bits.netbeans.org/6.9/javadoc/org-openide-filesystems/apichanges.html#MultiFileSystem.weight">
* More about weight attribute</a>.
*
* @return value of the weight attribute. When ommited (default value is used)
* then no weight attribute gets generated.
int weight() default Integer.MIN_VALUE;
// some tools may query FO's properties and expect it there.
file.stringvalue(Action.NAME, actionName);
// Resolve weight attribute that allows to override existing action
int weight = annotation.weight();
if (weight != Integer.MIN_VALUE) {
file.intvalue("weight", weight);
if (directActionCreation) {
if (methodName != null) {
file.methodvalue("instanceCreate", className, methodName);
@EditorActionRegistration(name = buildToolTipAction)
@EditorActionRegistration(name = buildToolTipAction, weight = 100)
public static class NbBuildToolTipAction extends BuildToolTipAction {
public @Override void actionPerformed(ActionEvent evt, JTextComponent target) {
Set<String> overriders = overrides.keySet();
String file = e.getKey();
if (file.matches("Editors/Actions/build-(popup-menu|tool-tip)[.]instance")) {
// Provided by editor.lib but overridden (direct dep) by editor.
// Seems like the editor.lib definition might be needed if editor is missing.
// @EditorActionRegistration does not supply a way to define a weight.
// So for now, just permit this special case.
continue;
if (new HashSet<ContentAndAttrs>(overrides.values()).size() == 1) {
// All the same. Check whether these are parallel declarations (e.g. CND debugger vs. Java debugger), or vertical.
for (String overrider : overriders) {