Skip to content

Commit

Permalink
Improved generators.
Browse files Browse the repository at this point in the history
- fixed plugin activation
- fixed selected object type
- added missing @generated
  • Loading branch information
ylussaud committed Apr 15, 2024
1 parent 426981e commit d90a4fc
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -66,17 +66,18 @@

/**
* The selected value.
* @generated
*/
private final List<EObject> value;

/**
* Constructor.
*
* @param selected
* the selected {@link EPackage}
* the selected {@link [module.getReceiverClassName()/]}
* @generated
*/
public MainGeneratorEclipse(EPackage selected) {
public MainGeneratorEclipse([module.getReceiverClassName()/] selected) {
super(Collections.emptyList(), getTarget(selected));
this.value = Collections.singletonList(selected);
}
Expand All @@ -91,14 +92,14 @@
}

/**
* Gets the target folder for the selected {@link EPackage}.
* Gets the target folder for the selected {@link [module.getReceiverClassName()/]}.
*
* @param selected
* the model {@link EPackage}
* @return the target folder for the selected {@link EPackage}
* the model {@link [module.getReceiverClassName()/]}
* @return the target folder for the selected {@link [module.getReceiverClassName()/]}
* @generated
*/
private static String getTarget(EPackage selected) {
private static String getTarget([module.getReceiverClassName()/] selected) {
final String res;

final AbstractResourceSelectionDialog dialog = new FolderSelectionDialog(PlatformUI.getWorkbench()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@
*/
public class [module.getEclipseHandlerClassName()/] extends AbstractHandler {

/**
* @generated
*/
@Override
public Object execute(ExecutionEvent event) throws ExecutionException {
final IStructuredSelection selection = HandlerUtil.getCurrentStructuredSelection(event);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
org.eclipse.ui,
org.eclipse.acceleo.aql.ide.ui;bundle-version="['['/]4.0.0,5.0.0)
Automatic-Module-Name: [projectUIName/]
Bundle-Activator: [projectUIName/].Activator$Implementation
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Bundle-ClassPath: .
[/file]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@
*
* @param args
* resources separated by a comma, target folder
* @generated
*/
public static void main(String['['/]] args) {
if (args.length == 2) {
Expand Down Expand Up @@ -211,6 +212,7 @@
* @param module
* the {@link Module}
* @return the {@link List} of {@link Template} to generate for the given {@link Module}
* @generated
*/
protected List<Template> getTemplates(Module module) {
return AcceleoUtil.getMainTemplate(module);
Expand All @@ -228,6 +230,7 @@
* @param resourceSetForModels
* the {@link ResourceServices} for models
* @return the {@link List} of {@link EObject} values to use
* @generated
*/
protected List<EObject> getValues(IQualifiedNameQueryEnvironment queryEnvironment,
final Map<EClass, List<EObject>> valuesCache, TypeLiteral type,
Expand Down Expand Up @@ -476,6 +479,7 @@
* the {@link Diagnostic}
* @param indentation
* the current indentation
* @generated
*/
protected void printDiagnostic(PrintStream stream, Diagnostic diagnostic, String indentation) {
String nextIndentation = indentation;
Expand Down

0 comments on commit d90a4fc

Please sign in to comment.