Skip to content

Commit

Permalink
Added template libraries.
Browse files Browse the repository at this point in the history
  • Loading branch information
ylussaud committed Oct 17, 2024
1 parent 417a0d9 commit e28e913
Show file tree
Hide file tree
Showing 49 changed files with 1,732 additions and 504 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2017 Obeo.
* Copyright (c) 2017, 2024 Obeo.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v2.0
* which accompanies this distribution, and is available at
Expand All @@ -24,6 +24,7 @@
import org.eclipse.emf.cdo.session.CDOSession;
import org.eclipse.emf.cdo.transaction.CDOTransaction;
import org.eclipse.emf.common.util.Diagnostic;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.resource.ResourceSet;
import org.eclipse.emf.spi.cdo.InternalCDOView;
import org.eclipse.net4j.connector.IConnector;
Expand Down Expand Up @@ -80,6 +81,11 @@ public Map<String, String> getInitializedOptions(Map<String, String> options) {
return Collections.emptyMap();
}

@Override
public Map<String, String> getInitializedOptions(Map<String, String> options, EObject eObj) {
return Collections.emptyMap();
}

@Override
public Map<String, List<Diagnostic>> validate(IReadOnlyQueryEnvironment queryEnvironment,
Map<String, String> options) {
Expand Down
2 changes: 1 addition & 1 deletion plugins/org.obeonetwork.m2doc.genconf.editor/.classpath
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src-gen"/>
<classpathentry kind="src" path="src"/>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,34 +1,38 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
org.eclipse.jdt.core.compiler.compliance=1.7
org.eclipse.jdt.core.compiler.compliance=1.8
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.source=1.7
org.eclipse.jdt.core.compiler.source=1.8
org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
org.eclipse.jdt.core.formatter.alignment_for_additive_operator=20
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=20
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
org.eclipse.jdt.core.formatter.alignment_for_assignment=0
org.eclipse.jdt.core.formatter.alignment_for_binary_expression=20
org.eclipse.jdt.core.formatter.alignment_for_bitwise_operator=20
org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
org.eclipse.jdt.core.formatter.alignment_for_enum_constants=16
org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
org.eclipse.jdt.core.formatter.alignment_for_logical_operator=20
org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0
org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
org.eclipse.jdt.core.formatter.alignment_for_multiplicative_operator=20
org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=80
org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
org.eclipse.jdt.core.formatter.alignment_for_string_concatenation=20
org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
Expand Down Expand Up @@ -114,11 +118,12 @@ org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
org.eclipse.jdt.core.formatter.insert_space_after_additive_operator=insert
org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
org.eclipse.jdt.core.formatter.insert_space_after_bitwise_operator=insert
org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
Expand Down Expand Up @@ -149,6 +154,8 @@ org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
org.eclipse.jdt.core.formatter.insert_space_after_lambda_arrow=insert
org.eclipse.jdt.core.formatter.insert_space_after_logical_operator=insert
org.eclipse.jdt.core.formatter.insert_space_after_multiplicative_operator=insert
org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
Expand All @@ -173,13 +180,17 @@ org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
org.eclipse.jdt.core.formatter.insert_space_after_relational_operator=insert
org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources=insert
org.eclipse.jdt.core.formatter.insert_space_after_shift_operator=insert
org.eclipse.jdt.core.formatter.insert_space_after_string_concatenation=insert
org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_additive_operator=insert
org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
org.eclipse.jdt.core.formatter.insert_space_before_bitwise_operator=insert
org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
Expand Down Expand Up @@ -227,6 +238,8 @@ org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do no
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_lambda_arrow=insert
org.eclipse.jdt.core.formatter.insert_space_before_logical_operator=insert
org.eclipse.jdt.core.formatter.insert_space_before_multiplicative_operator=insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
Expand Down Expand Up @@ -263,9 +276,12 @@ org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not inser
org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_relational_operator=insert
org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_shift_operator=insert
org.eclipse.jdt.core.formatter.insert_space_before_string_concatenation=insert
org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
Expand All @@ -291,7 +307,11 @@ org.eclipse.jdt.core.formatter.tabulation.char=space
org.eclipse.jdt.core.formatter.tabulation.size=4
org.eclipse.jdt.core.formatter.use_on_off_tags=true
org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
org.eclipse.jdt.core.formatter.wrap_before_additive_operator=true
org.eclipse.jdt.core.formatter.wrap_before_bitwise_operator=true
org.eclipse.jdt.core.formatter.wrap_before_logical_operator=true
org.eclipse.jdt.core.formatter.wrap_before_multiplicative_operator=true
org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true
org.eclipse.jdt.core.formatter.wrap_before_string_concatenation=true
org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true
org.eclipse.jdt.core.javaFormatter=org.eclipse.jdt.core.defaultJavaFormatter
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Bundle-ClassPath: .
Bundle-Activator: org.obeonetwork.m2doc.genconf.presentation.M2docconfEditorPlugin$Implementation
Bundle-Vendor: %providerName
Bundle-Localization: plugin
Bundle-RequiredExecutionEnvironment: JavaSE-1.7
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Export-Package: org.obeonetwork.m2doc.genconf.editor,
org.obeonetwork.m2doc.genconf.editor.command,
org.obeonetwork.m2doc.genconf.editor.dialog,
Expand Down
67 changes: 43 additions & 24 deletions plugins/org.obeonetwork.m2doc.genconf.editor/plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<?eclipse version="3.0"?>

<!--
Copyright (c) 2016, 2020 Obeo.
Copyright (c) 2016, 2024 Obeo.
All rights reserved. This program and the accompanying materials
are made available under the terms of the Eclipse Public License v2.0
which accompanies this distribution, and is available at
Expand Down Expand Up @@ -48,6 +48,10 @@
id="org.obeonetwork.m2doc.genconf.editor.refreshInterpreter"
name="Refresh Generation Context">
</command>
<command
id="org.obeonetwork.m2doc.genconf.editor.generateWithTemplateLibrary"
name="M2Doc Generate with Template Library">
</command>
</extension>
<extension
point="org.eclipse.ui.handlers">
Expand All @@ -71,6 +75,10 @@
class="org.obeonetwork.m2doc.genconf.editor.command.RefreshInterpreterHandler"
commandId="org.obeonetwork.m2doc.genconf.editor.refreshInterpreter">
</handler>
<handler
class="org.obeonetwork.m2doc.genconf.editor.command.GenerateWithTemplateLibrary"
commandId="org.obeonetwork.m2doc.genconf.editor.generateWithTemplateLibrary">
</handler>
</extension>

<extension
Expand All @@ -93,7 +101,7 @@
<or>
<test
forcePluginActivation="true"
property="org.obeonetwork.m2doc.genconf.editor.testGeneration">
property="org.obeonetwork.m2doc.genconf.editor.property.isGeneration">
</test>
<test
property="org.eclipse.core.resources.extension"
Expand All @@ -118,7 +126,7 @@
operator="or">
<test
forcePluginActivation="true"
property="org.obeonetwork.m2doc.ide.ui.testTemplate">
property="org.obeonetwork.m2doc.ide.ui.property.isTemplate">
</test>
</iterate>
</with>
Expand All @@ -139,7 +147,7 @@
<or>
<test
forcePluginActivation="true"
property="org.obeonetwork.m2doc.genconf.editor.testGeneration">
property="org.obeonetwork.m2doc.genconf.editor.property.isGeneration">
</test>
<test
property="org.eclipse.core.resources.extension"
Expand All @@ -165,7 +173,7 @@
<or>
<test
forcePluginActivation="true"
property="org.obeonetwork.m2doc.genconf.editor.testGeneration">
property="org.obeonetwork.m2doc.genconf.editor.property.isGeneration">
</test>
<test
property="org.eclipse.core.resources.extension"
Expand All @@ -192,7 +200,7 @@
operator="or">
<test
forcePluginActivation="true"
property="org.obeonetwork.m2doc.genconf.editor.propertyTesterGenerateTemplate">
property="org.obeonetwork.m2doc.genconf.editor.property.canGenerateTemplate">
</test>
</iterate>
</with>
Expand All @@ -214,12 +222,37 @@
operator="or">
<test
forcePluginActivation="true"
property="org.obeonetwork.m2doc.genconf.editor.propertyTesterUpdateDocument">
property="org.obeonetwork.m2doc.genconf.editor.property.canUpdateDocument">
</test>
</iterate>
</with>
</visibleWhen>
</menu>
<command
commandId="org.obeonetwork.m2doc.genconf.editor.generateWithTemplateLibrary"
icon="icons/m2doc.gif"
label="M2Doc Generate with Template Library"
style="push">
<visibleWhen
checkEnabled="false">
<with
variable="selection">
<and>
<count
value="1">
</count>
<iterate
ifEmpty="false"
operator="or">
<test
forcePluginActivation="true"
property="org.obeonetwork.m2doc.ide.ui.property.hasLibraryTemplate">
</test>
</iterate>
</and>
</with>
</visibleWhen>
</command>
</menuContribution>
<menuContribution
allPopups="false"
Expand All @@ -244,25 +277,11 @@
point="org.eclipse.core.expressions.propertyTesters">
<propertyTester
class="org.obeonetwork.m2doc.genconf.propertyTester.GenerationPropertyTester"
id="org.obeonetwork.m2doc.genconf.editor.testGeneration"
namespace="org.obeonetwork.m2doc.genconf.editor"
properties="testGeneration"
id="org.obeonetwork.m2doc.genconf.editor.property"
namespace="org.obeonetwork.m2doc.genconf.editor.property"
properties="isGeneration,canGenerateTemplate,canUpdateDocument"
type="java.lang.Object">
</propertyTester>
<propertyTester
class="org.obeonetwork.m2doc.genconf.propertyTester.GenerateTemplatePropertyTester"
id="org.obeonetwork.m2doc.genconf.editor.propertyTesterGenerateTemplate"
namespace="org.obeonetwork.m2doc.genconf.editor"
properties="propertyTesterGenerateTemplate"
type="org.eclipse.core.resources.IFile">
</propertyTester>
<propertyTester
class="org.obeonetwork.m2doc.genconf.propertyTester.UpdateDocumentPropertyTester"
id="org.obeonetwork.m2doc.genconf.editor.propertyTesterUpdateDocument"
namespace="org.obeonetwork.m2doc.genconf.editor"
properties="propertyTesterUpdateDocument"
type="org.eclipse.core.resources.IFile">
</propertyTester>
</extension>
<extension
point="org.eclipse.ui.newWizards">
Expand Down
Loading

0 comments on commit e28e913

Please sign in to comment.