SlideShare a Scribd company logo
Extending the Java Editor
1. Project templates
2. File templates
3. Editor actions
4. File actions
5. Code generators
6. Error annotations
Module Development Tools
Project Templates
Project Templates
@TemplateRegistration(
folder = "Project/Samples/Standard",
displayName = "#MyApp_displayName",
description = "MyAppDescription.html",
iconBase = "org/nb/alpha/deps/MyApp.png",
content = "MyAppProject.zip")
1.
public class MyAppWizardIterator implements
WizardDescriptor.InstantiatingIterator {
File Templates
File Templates

@TemplateRegistration(
folder = "Other",
content = "AbcTemplate.abc")
package org.nb.alpha.deps;
import org.netbeans.api.templates.TemplateRegistration;
Editor Actions
Editor Actions
@ActionID(
category = "Tools",
id = "org.nb.alpha.deps.SomeAction"
)
@ActionRegistration(
displayName = "#CTL_SomeAction"
)
@ActionReferences({
@ActionReference(path = "Menu/File", position = 0),
@ActionReference(path = "Editors/text/x-java/Popup", position = 400)
})
@Messages("CTL_SomeAction=Some")
public final class SomeAction implements ActionListener {
private final DataObject context;
public SomeAction(DataObject context) {
this.context = context;
}
@Override
public void actionPerformed(ActionEvent ev) {
// TODO use context
}
}
File Actions
File Actions
@ActionID(
category = "Tools",
id = "org.nb.alpha.deps.AnotherAction"
)
@ActionRegistration(
iconBase = "org/nb/alpha/deps/icon.png",
displayName = "#CTL_AnotherAction"
)
@ActionReferences({
@ActionReference(path = "Menu/File", position = 0),
@ActionReference(path = "Loaders/text/x-java/Actions", position = 0)
})
@Messages("CTL_AnotherAction=Another")
public final class AnotherAction implements ActionListener {
private final DataObject context;
public AnotherAction(DataObject context) {
this.context = context;
}
@Override
public void actionPerformed(ActionEvent ev) {
// TODO use context
}
}
Code Generators
Code Generators
public class ActionPerformedGenerator implements CodeGenerator {
JTextComponent textComp;
private ActionPerformedGenerator(Lookup context) {
textComp = context.lookup(JTextComponent.class);
}
@MimeRegistration(mimeType = "text/x-java", service = CodeGenerator.Factory.class)
public static class Factory implements CodeGenerator.Factory {
public List<? extends CodeGenerator> create(Lookup context) {
return Collections.singletonList(new ActionPerformedGenerator(context));
}
}
public String getDisplayName() {
return "Action Performed Generator";
}
public void invoke() {
//do something with the text component...
}
}
Error Annotations
Error Annotations
<folder name="Editors">
<folder name="AnnotationTypes">
<file name="org-netbeans-modules-yourfirstannotation.xml"
url="HTMLAnnotation.xml">
</file>
</folder>
</folder>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE type PUBLIC
"-//NetBeans//DTD annotation type 1.1//EN"
"http://www.netbeans.org/dtds/annotation-type-1_1.dtd">
<type name="org-netbeans-modules-yourfirstannotation"
description_key="yourfirstannotation"
localizing_bundle="org.netbeans.modules.yourfirstannotation.Bundle"
visible="true"
glyph="nbresloc:/org/netbeans/modules/java/resources/error-glyph.gif"
highlight="#66CC33"
type="line"
browseable="false"
severity="ok"
/>

More Related Content

Similar to Ext java-editor

Django Overview
Django OverviewDjango Overview
Django Overview
Brian Tol
 
Test Complete
Test CompleteTest Complete
Test Complete
RomSoft SRL
 
Google Apps Script for Beginners- Amazing Things with Code
Google Apps Script for Beginners- Amazing Things with CodeGoogle Apps Script for Beginners- Amazing Things with Code
Google Apps Script for Beginners- Amazing Things with Code
Laurence Svekis ✔
 
Django 1.10.3 Getting started
Django 1.10.3 Getting startedDjango 1.10.3 Getting started
Django 1.10.3 Getting started
MoniaJ
 
Techorama 2019 - ASP.NET Core One Hour Makeover
Techorama 2019 - ASP.NET Core One Hour MakeoverTechorama 2019 - ASP.NET Core One Hour Makeover
Techorama 2019 - ASP.NET Core One Hour Makeover
Jon Galloway
 
GDG Addis - An Introduction to Django and App Engine
GDG Addis - An Introduction to Django and App EngineGDG Addis - An Introduction to Django and App Engine
GDG Addis - An Introduction to Django and App EngineYared Ayalew
 
Django
DjangoDjango
Django
DjangoDjango
Django apps and ORM Beyond the basics [Meetup hosted by Prodeers.com]
Django apps and ORM Beyond the basics [Meetup hosted by Prodeers.com]Django apps and ORM Beyond the basics [Meetup hosted by Prodeers.com]
Django apps and ORM Beyond the basics [Meetup hosted by Prodeers.com]
Udit Gangwani
 
XCode Templates tutorial – How To Create Custom Template Step By Step.pdf
XCode Templates tutorial – How To Create Custom Template Step By Step.pdfXCode Templates tutorial – How To Create Custom Template Step By Step.pdf
XCode Templates tutorial – How To Create Custom Template Step By Step.pdf
SatawareTechnologies6
 
Introduction Django
Introduction DjangoIntroduction Django
Introduction Django
Wade Austin
 
Cloud native programming model comparison
Cloud native programming model comparisonCloud native programming model comparison
Cloud native programming model comparison
Emily Jiang
 
SharePoint Saturday Atlanta 2015
SharePoint Saturday Atlanta 2015SharePoint Saturday Atlanta 2015
SharePoint Saturday Atlanta 2015
Pushkar Chivate
 
django
djangodjango
You've done the Django Tutorial, what next?
You've done the Django Tutorial, what next?You've done the Django Tutorial, what next?
You've done the Django Tutorial, what next?
Andy McKay
 
Cross-Platform Native Mobile Development with Eclipse
Cross-Platform Native Mobile Development with EclipseCross-Platform Native Mobile Development with Eclipse
Cross-Platform Native Mobile Development with Eclipse
Peter Friese
 
Microsoft Graph community call-October 2018
Microsoft Graph community call-October 2018Microsoft Graph community call-October 2018
Microsoft Graph community call-October 2018
Microsoft 365 Developer
 
Lec005 android start_program
Lec005 android start_programLec005 android start_program
Lec005 android start_program
Eyad Almasri
 
Must be similar to screenshotsI must be able to run the projects.docx
Must be similar to screenshotsI must be able to run the projects.docxMust be similar to screenshotsI must be able to run the projects.docx
Must be similar to screenshotsI must be able to run the projects.docx
herthaweston
 
بررسی چارچوب جنگو
بررسی چارچوب جنگوبررسی چارچوب جنگو
بررسی چارچوب جنگو
railsbootcamp
 

Similar to Ext java-editor (20)

Django Overview
Django OverviewDjango Overview
Django Overview
 
Test Complete
Test CompleteTest Complete
Test Complete
 
Google Apps Script for Beginners- Amazing Things with Code
Google Apps Script for Beginners- Amazing Things with CodeGoogle Apps Script for Beginners- Amazing Things with Code
Google Apps Script for Beginners- Amazing Things with Code
 
Django 1.10.3 Getting started
Django 1.10.3 Getting startedDjango 1.10.3 Getting started
Django 1.10.3 Getting started
 
Techorama 2019 - ASP.NET Core One Hour Makeover
Techorama 2019 - ASP.NET Core One Hour MakeoverTechorama 2019 - ASP.NET Core One Hour Makeover
Techorama 2019 - ASP.NET Core One Hour Makeover
 
GDG Addis - An Introduction to Django and App Engine
GDG Addis - An Introduction to Django and App EngineGDG Addis - An Introduction to Django and App Engine
GDG Addis - An Introduction to Django and App Engine
 
Django
DjangoDjango
Django
 
Django
DjangoDjango
Django
 
Django apps and ORM Beyond the basics [Meetup hosted by Prodeers.com]
Django apps and ORM Beyond the basics [Meetup hosted by Prodeers.com]Django apps and ORM Beyond the basics [Meetup hosted by Prodeers.com]
Django apps and ORM Beyond the basics [Meetup hosted by Prodeers.com]
 
XCode Templates tutorial – How To Create Custom Template Step By Step.pdf
XCode Templates tutorial – How To Create Custom Template Step By Step.pdfXCode Templates tutorial – How To Create Custom Template Step By Step.pdf
XCode Templates tutorial – How To Create Custom Template Step By Step.pdf
 
Introduction Django
Introduction DjangoIntroduction Django
Introduction Django
 
Cloud native programming model comparison
Cloud native programming model comparisonCloud native programming model comparison
Cloud native programming model comparison
 
SharePoint Saturday Atlanta 2015
SharePoint Saturday Atlanta 2015SharePoint Saturday Atlanta 2015
SharePoint Saturday Atlanta 2015
 
django
djangodjango
django
 
You've done the Django Tutorial, what next?
You've done the Django Tutorial, what next?You've done the Django Tutorial, what next?
You've done the Django Tutorial, what next?
 
Cross-Platform Native Mobile Development with Eclipse
Cross-Platform Native Mobile Development with EclipseCross-Platform Native Mobile Development with Eclipse
Cross-Platform Native Mobile Development with Eclipse
 
Microsoft Graph community call-October 2018
Microsoft Graph community call-October 2018Microsoft Graph community call-October 2018
Microsoft Graph community call-October 2018
 
Lec005 android start_program
Lec005 android start_programLec005 android start_program
Lec005 android start_program
 
Must be similar to screenshotsI must be able to run the projects.docx
Must be similar to screenshotsI must be able to run the projects.docxMust be similar to screenshotsI must be able to run the projects.docx
Must be similar to screenshotsI must be able to run the projects.docx
 
بررسی چارچوب جنگو
بررسی چارچوب جنگوبررسی چارچوب جنگو
بررسی چارچوب جنگو
 

More from Geertjan Wielenga

The Long Walk to Apache NetBeans
The Long Walk to Apache NetBeansThe Long Walk to Apache NetBeans
The Long Walk to Apache NetBeans
Geertjan Wielenga
 
Java Master Class
Java Master ClassJava Master Class
Java Master Class
Geertjan Wielenga
 
Coding from Application Container Cloud to Oracle JET
Coding from Application Container Cloud to Oracle JETCoding from Application Container Cloud to Oracle JET
Coding from Application Container Cloud to Oracle JET
Geertjan Wielenga
 
Session at Oredev 2016.
Session at Oredev 2016.Session at Oredev 2016.
Session at Oredev 2016.
Geertjan Wielenga
 
JFall 2016: Oracle JET Session
JFall 2016: Oracle JET SessionJFall 2016: Oracle JET Session
JFall 2016: Oracle JET Session
Geertjan Wielenga
 
Slovenian Oracle User Group
Slovenian Oracle User GroupSlovenian Oracle User Group
Slovenian Oracle User Group
Geertjan Wielenga
 
Imworld.ro
Imworld.roImworld.ro
Imworld.ro
Geertjan Wielenga
 
Oracle User Group Holland
Oracle User Group HollandOracle User Group Holland
Oracle User Group Holland
Geertjan Wielenga
 
State of NetBeans
State of NetBeansState of NetBeans
State of NetBeans
Geertjan Wielenga
 
Oracle JET, with JET Mobile Content
Oracle JET, with JET Mobile ContentOracle JET, with JET Mobile Content
Oracle JET, with JET Mobile Content
Geertjan Wielenga
 
10 Building Blocks for Enterprise JavaScript
10 Building Blocks for Enterprise JavaScript10 Building Blocks for Enterprise JavaScript
10 Building Blocks for Enterprise JavaScript
Geertjan Wielenga
 
Japanese Introduction to Oracle JET
Japanese Introduction to Oracle JETJapanese Introduction to Oracle JET
Japanese Introduction to Oracle JET
Geertjan Wielenga
 
Oracle JET
Oracle JETOracle JET
Oracle JET
Geertjan Wielenga
 
geecon 2016: "What's Oracle Doing with JavaScript?!"
geecon 2016: "What's Oracle Doing with JavaScript?!"geecon 2016: "What's Oracle Doing with JavaScript?!"
geecon 2016: "What's Oracle Doing with JavaScript?!"
Geertjan Wielenga
 
Technology Evangelism
Technology EvangelismTechnology Evangelism
Technology Evangelism
Geertjan Wielenga
 
Technology evangelist
Technology evangelistTechnology evangelist
Technology evangelist
Geertjan Wielenga
 
Surviving Life in the JavaScript Ecosystem
Surviving Life in the JavaScript EcosystemSurviving Life in the JavaScript Ecosystem
Surviving Life in the JavaScript Ecosystem
Geertjan Wielenga
 
Oracle JET: Enterprise-Ready JavaScript Toolkit
Oracle JET: Enterprise-Ready JavaScript ToolkitOracle JET: Enterprise-Ready JavaScript Toolkit
Oracle JET: Enterprise-Ready JavaScript Toolkit
Geertjan Wielenga
 
NetBeans Workshop at Hanze University of Applied Science, Groningen
NetBeans Workshop at Hanze University of Applied Science, GroningenNetBeans Workshop at Hanze University of Applied Science, Groningen
NetBeans Workshop at Hanze University of Applied Science, Groningen
Geertjan Wielenga
 
Coding for Desktop & Mobile with HTML5 & Java EE
Coding for Desktop & Mobile with HTML5 & Java EECoding for Desktop & Mobile with HTML5 & Java EE
Coding for Desktop & Mobile with HTML5 & Java EE
Geertjan Wielenga
 

More from Geertjan Wielenga (20)

The Long Walk to Apache NetBeans
The Long Walk to Apache NetBeansThe Long Walk to Apache NetBeans
The Long Walk to Apache NetBeans
 
Java Master Class
Java Master ClassJava Master Class
Java Master Class
 
Coding from Application Container Cloud to Oracle JET
Coding from Application Container Cloud to Oracle JETCoding from Application Container Cloud to Oracle JET
Coding from Application Container Cloud to Oracle JET
 
Session at Oredev 2016.
Session at Oredev 2016.Session at Oredev 2016.
Session at Oredev 2016.
 
JFall 2016: Oracle JET Session
JFall 2016: Oracle JET SessionJFall 2016: Oracle JET Session
JFall 2016: Oracle JET Session
 
Slovenian Oracle User Group
Slovenian Oracle User GroupSlovenian Oracle User Group
Slovenian Oracle User Group
 
Imworld.ro
Imworld.roImworld.ro
Imworld.ro
 
Oracle User Group Holland
Oracle User Group HollandOracle User Group Holland
Oracle User Group Holland
 
State of NetBeans
State of NetBeansState of NetBeans
State of NetBeans
 
Oracle JET, with JET Mobile Content
Oracle JET, with JET Mobile ContentOracle JET, with JET Mobile Content
Oracle JET, with JET Mobile Content
 
10 Building Blocks for Enterprise JavaScript
10 Building Blocks for Enterprise JavaScript10 Building Blocks for Enterprise JavaScript
10 Building Blocks for Enterprise JavaScript
 
Japanese Introduction to Oracle JET
Japanese Introduction to Oracle JETJapanese Introduction to Oracle JET
Japanese Introduction to Oracle JET
 
Oracle JET
Oracle JETOracle JET
Oracle JET
 
geecon 2016: "What's Oracle Doing with JavaScript?!"
geecon 2016: "What's Oracle Doing with JavaScript?!"geecon 2016: "What's Oracle Doing with JavaScript?!"
geecon 2016: "What's Oracle Doing with JavaScript?!"
 
Technology Evangelism
Technology EvangelismTechnology Evangelism
Technology Evangelism
 
Technology evangelist
Technology evangelistTechnology evangelist
Technology evangelist
 
Surviving Life in the JavaScript Ecosystem
Surviving Life in the JavaScript EcosystemSurviving Life in the JavaScript Ecosystem
Surviving Life in the JavaScript Ecosystem
 
Oracle JET: Enterprise-Ready JavaScript Toolkit
Oracle JET: Enterprise-Ready JavaScript ToolkitOracle JET: Enterprise-Ready JavaScript Toolkit
Oracle JET: Enterprise-Ready JavaScript Toolkit
 
NetBeans Workshop at Hanze University of Applied Science, Groningen
NetBeans Workshop at Hanze University of Applied Science, GroningenNetBeans Workshop at Hanze University of Applied Science, Groningen
NetBeans Workshop at Hanze University of Applied Science, Groningen
 
Coding for Desktop & Mobile with HTML5 & Java EE
Coding for Desktop & Mobile with HTML5 & Java EECoding for Desktop & Mobile with HTML5 & Java EE
Coding for Desktop & Mobile with HTML5 & Java EE
 

Recently uploaded

Climate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing DaysClimate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing Days
Kari Kakkonen
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
Laura Byrne
 
A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...
sonjaschweigert1
 
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
Neo4j
 
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
Neo4j
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
Jemma Hussein Allen
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
Safe Software
 
Pushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 daysPushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 days
Adtran
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
BookNet Canada
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Albert Hoitingh
 
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Nexer Digital
 
GridMate - End to end testing is a critical piece to ensure quality and avoid...
GridMate - End to end testing is a critical piece to ensure quality and avoid...GridMate - End to end testing is a critical piece to ensure quality and avoid...
GridMate - End to end testing is a critical piece to ensure quality and avoid...
ThomasParaiso2
 
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
Neo4j
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
DanBrown980551
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance
 
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
James Anderson
 
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdf
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdfSAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdf
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdf
Peter Spielvogel
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
Kari Kakkonen
 
National Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practicesNational Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practices
Quotidiano Piemontese
 
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
SOFTTECHHUB
 

Recently uploaded (20)

Climate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing DaysClimate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing Days
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
 
A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...
 
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
 
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
 
Pushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 daysPushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 days
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
 
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?
 
GridMate - End to end testing is a critical piece to ensure quality and avoid...
GridMate - End to end testing is a critical piece to ensure quality and avoid...GridMate - End to end testing is a critical piece to ensure quality and avoid...
GridMate - End to end testing is a critical piece to ensure quality and avoid...
 
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
 
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
 
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdf
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdfSAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdf
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdf
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
 
National Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practicesNational Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practices
 
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
 

Ext java-editor

  • 1. Extending the Java Editor 1. Project templates 2. File templates 3. Editor actions 4. File actions 5. Code generators 6. Error annotations
  • 4. Project Templates @TemplateRegistration( folder = "Project/Samples/Standard", displayName = "#MyApp_displayName", description = "MyAppDescription.html", iconBase = "org/nb/alpha/deps/MyApp.png", content = "MyAppProject.zip") 1. public class MyAppWizardIterator implements WizardDescriptor.InstantiatingIterator {
  • 6. File Templates @TemplateRegistration( folder = "Other", content = "AbcTemplate.abc") package org.nb.alpha.deps; import org.netbeans.api.templates.TemplateRegistration;
  • 8. Editor Actions @ActionID( category = "Tools", id = "org.nb.alpha.deps.SomeAction" ) @ActionRegistration( displayName = "#CTL_SomeAction" ) @ActionReferences({ @ActionReference(path = "Menu/File", position = 0), @ActionReference(path = "Editors/text/x-java/Popup", position = 400) }) @Messages("CTL_SomeAction=Some") public final class SomeAction implements ActionListener { private final DataObject context; public SomeAction(DataObject context) { this.context = context; } @Override public void actionPerformed(ActionEvent ev) { // TODO use context } }
  • 10. File Actions @ActionID( category = "Tools", id = "org.nb.alpha.deps.AnotherAction" ) @ActionRegistration( iconBase = "org/nb/alpha/deps/icon.png", displayName = "#CTL_AnotherAction" ) @ActionReferences({ @ActionReference(path = "Menu/File", position = 0), @ActionReference(path = "Loaders/text/x-java/Actions", position = 0) }) @Messages("CTL_AnotherAction=Another") public final class AnotherAction implements ActionListener { private final DataObject context; public AnotherAction(DataObject context) { this.context = context; } @Override public void actionPerformed(ActionEvent ev) { // TODO use context } }
  • 12. Code Generators public class ActionPerformedGenerator implements CodeGenerator { JTextComponent textComp; private ActionPerformedGenerator(Lookup context) { textComp = context.lookup(JTextComponent.class); } @MimeRegistration(mimeType = "text/x-java", service = CodeGenerator.Factory.class) public static class Factory implements CodeGenerator.Factory { public List<? extends CodeGenerator> create(Lookup context) { return Collections.singletonList(new ActionPerformedGenerator(context)); } } public String getDisplayName() { return "Action Performed Generator"; } public void invoke() { //do something with the text component... } }
  • 14. Error Annotations <folder name="Editors"> <folder name="AnnotationTypes"> <file name="org-netbeans-modules-yourfirstannotation.xml" url="HTMLAnnotation.xml"> </file> </folder> </folder> <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE type PUBLIC "-//NetBeans//DTD annotation type 1.1//EN" "http://www.netbeans.org/dtds/annotation-type-1_1.dtd"> <type name="org-netbeans-modules-yourfirstannotation" description_key="yourfirstannotation" localizing_bundle="org.netbeans.modules.yourfirstannotation.Bundle" visible="true" glyph="nbresloc:/org/netbeans/modules/java/resources/error-glyph.gif" highlight="#66CC33" type="line" browseable="false" severity="ok" />