MoreDeclarativeRegistrationUsingAnnotations

(Difference between revisions)
m (Palette items)
 
(19 intermediate revisions not shown)
Line 1: Line 1:
-
Starting point: [[DeclarativeRegistrationUsingAnnotations#Potential_Layer_Annotations]]
+
Background: [[DeclarativeRegistrationUsingAnnotations#Potential_Layer_Annotations]]
-
MIME resolvers, data loaders, startup tasks, Navigator panels, tasklist & quick search providers, ...
+
In addition to new annotations, we need more editor hints to replace old layer.xml registrations - only a few cases (actions, templates) are currently covered, and even then not fully.
 +
 
 +
=MIME resolvers=
 +
 
 +
[http://netbeans.org/bugzilla/show_bug.cgi?id=191777#c10 bug #191777]
 +
 
 +
=Data loaders=
 +
 
 +
[http://netbeans.org/bugzilla/show_bug.cgi?id=207219 bug #207219]
 +
 
 +
[[DeclarativeRegistrationUsingAnnotationsDataObjectMigration]]
 +
 
 +
==Loader actions==
 +
 
 +
Tricky to handle context menu actions. See [[DeclarativeRegistrationUsingAnnotations#Problems_with_actions]] for discussion.
 +
 
 +
=Startup tasks=
 +
 
 +
Most simply: an annotation to register ModuleInstall implementations.
 +
 
 +
More ambitiously, an annotation to cover parallelizable startup tasks, perhaps replacing ModuleInstall as well as other hooks: #200636. ''done''
 +
 
 +
Either would supersede #163937 (refactoring hook).
 +
 
 +
=Navigator panels=
 +
 
 +
[https://netbeans.org/bugzilla/show_bug.cgi?id=206954 bug #206954] ''done''
 +
 
 +
=Task list providers=
 +
 
 +
Two kinds of provider, both should be simple to register.
 +
 
 +
Need to eliminate nonmodular registration of filters in TypesFilter.enabledProviders (see c6e3e159fc1b for example).
 +
 
 +
=Quick search providers=
 +
 
 +
Should be simple.
 +
 
 +
=Palette items=
 +
 
 +
Probably straightforward as package annotations.
 +
See [http://netbeans.org/bugzilla/show_bug.cgi?id=227345 #227345]
 +
 
 +
=XML catalogs, schemas, DTDs=
 +
 
 +
May be tricky. See #192595 for discussion.
 +
 
 +
=Project type registration=
 +
 
 +
See #193549.
 +
 
 +
=Repeating annotations=
 +
 
 +
[http://openjdk.java.net/jeps/120 JEP 120] proposes repeating annotations, which would allow us to write the more natural
 +
 
 +
@ActionID(...)
 +
@ActionRegistration(...)
 +
@ActionReference(path="Menu/File")
 +
@ActionReference(path="Toolbars/File")
 +
public class A implements ActionListener {...}
 +
 
 +
rather than the current awkward
 +
 
 +
@ActionID(...)
 +
@ActionRegistration(...)
 +
@ActionReferences({
 +
  @ActionReference(path="Menu/File")
 +
  @ActionReference(path="Toolbars/File")
 +
}
 +
public class A implements ActionListener {...}
 +
 
 +
Of course this has to wait for JDK 8 (or whenever the JEP is implemented).

Current revision as of 16:25, 10 July 2013

Background: DeclarativeRegistrationUsingAnnotations#Potential_Layer_Annotations

In addition to new annotations, we need more editor hints to replace old layer.xml registrations - only a few cases (actions, templates) are currently covered, and even then not fully.

Contents

MIME resolvers

bug #191777

Data loaders

bug #207219

DeclarativeRegistrationUsingAnnotationsDataObjectMigration

Loader actions

Tricky to handle context menu actions. See DeclarativeRegistrationUsingAnnotations#Problems_with_actions for discussion.

Startup tasks

Most simply: an annotation to register ModuleInstall implementations.

More ambitiously, an annotation to cover parallelizable startup tasks, perhaps replacing ModuleInstall as well as other hooks: #200636. done

Either would supersede #163937 (refactoring hook).

Navigator panels

bug #206954 done

Task list providers

Two kinds of provider, both should be simple to register.

Need to eliminate nonmodular registration of filters in TypesFilter.enabledProviders (see c6e3e159fc1b for example).

Quick search providers

Should be simple.

Palette items

Probably straightforward as package annotations. See #227345

XML catalogs, schemas, DTDs

May be tricky. See #192595 for discussion.

Project type registration

See #193549.

Repeating annotations

JEP 120 proposes repeating annotations, which would allow us to write the more natural

@ActionID(...)
@ActionRegistration(...)
@ActionReference(path="Menu/File")
@ActionReference(path="Toolbars/File")
public class A implements ActionListener {...}

rather than the current awkward

@ActionID(...)
@ActionRegistration(...)
@ActionReferences({
  @ActionReference(path="Menu/File")
  @ActionReference(path="Toolbars/File")
}
public class A implements ActionListener {...}

Of course this has to wait for JDK 8 (or whenever the JEP is implemented).

Not logged in. Log in, Register

By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo