Skip to content

Commit

Permalink
Merge pull request #114 from eMoflon/rkluge-dev
Browse files Browse the repository at this point in the history
Minor edits: docu and proper logging
  • Loading branch information
RolandKluge committed Dec 7, 2018
2 parents df9c4be + 21ffab5 commit 38261cc
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 7 deletions.
9 changes: 8 additions & 1 deletion org.moflon.core.feature/feature.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<feature
id="org.moflon.core.feature"
label="eMoflon Core Components Feature"
version="1.3.2.qualifier"
version="1.3.3.qualifier"
provider-name="eMoflon Developers"
plugin="org.moflon.core.branding">

Expand Down Expand Up @@ -170,4 +170,11 @@ See here for more details on EPL: http://www.eclipse.org/org/documents/epl-v10.p
version="0.0.0"
unpack="false"/>

<plugin
id="org.moflon.core.ui.packageregistration"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>

</feature>
2 changes: 1 addition & 1 deletion org.moflon.core.releng.updatesite/category.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<site>
<feature url="features/org.moflon.core.feature_1.3.2.qualifier.jar" id="org.moflon.core.feature" version="1.3.2.qualifier">
<feature url="features/org.moflon.core.feature_1.3.3.qualifier.jar" id="org.moflon.core.feature" version="1.3.3.qualifier">
<category name="org.moflon.core.category"/>
</feature>
<category-def name="org.moflon.core.category" label="eMoflon Core">
Expand Down
8 changes: 7 additions & 1 deletion org.moflon.core.releng.updatesite/site.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<site>
<feature url="features/org.moflon.core.feature_1.3.2.qualifier.jar" id="org.moflon.core.feature" version="1.3.2.qualifier">
<description name="eMoflon::Core update site" url="https://emoflon.org/emoflon-core-updatesite/snapshot/updatesite/">
For all available update channels of eMoflon::Core, see
https://github.com/eMoflon/emoflon-core-updatesite/ .
For further information on eMoflon::Core, see
https://emoflon.org/ .
</description>
<feature url="features/org.moflon.core.feature_1.3.3.qualifier.jar" id="org.moflon.core.feature" version="1.3.3.qualifier">
<category name="org.moflon.core.category"/>
</feature>
<category-def name="org.moflon.core.category" label="eMoflon Core">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: org.moflon.core.ui.packageregistration
Bundle-SymbolicName: org.moflon.core.ui.packageregistration;singleton:=true
Bundle-Version: 1.0.0.qualifier
Bundle-Version: 1.0.1.qualifier
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Require-Bundle: org.eclipse.emf.ecore;bundle-version="2.11.0",
org.eclipse.core.resources,
Expand Down
1 change: 1 addition & 0 deletions org.moflon.core.ui.packageregistration/build.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@ source.. = src/
output.. = bin/
bin.includes = META-INF/,\
.,\
icons/,\
plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,16 @@
/**
* This class provides the front-end capabilities for registering an EMF model.
*
* @author Roland Kluge - Initial implementation
*
* @author Dimitrios Kolovos - initial API and implementation
* @author Roland Kluge - Adjustment to eMoflon::Core
*/
public class RegisterMetamodelHandler extends AbstractCommandHandler {

/**
* Invokes {@link #registerMetamodelInFile(IFile)} for each {@link IFile} in the selection
* @param event the event to handle
* @param {@link AbstractCommandHandler#DEFAULT_HANDLER_RESULT}
*/
@Override
public Object execute(final ExecutionEvent event) throws ExecutionException {
final ISelection selection = HandlerUtil.getCurrentSelectionChecked(event);
Expand All @@ -44,13 +49,17 @@ public Object execute(final ExecutionEvent event) throws ExecutionException {
return AbstractCommandHandler.DEFAULT_HANDLER_RESULT;
}

/**
* Uses {@link EmfRegistryManager} to register the given {@link IFile}
* @param file the file to register
*/
private void registerMetamodelInFile(final IFile file) {
final String fileName = file.getFullPath().toOSString();
try {
EmfRegistryManager.getInstance().registerMetamodel(fileName);
logger.info("Metamodel " + fileName + " registered successfully");
} catch (final Exception ex) {
logger.info("Metamodel " + fileName + " could not be registered", ex);
logger.error("Metamodel " + fileName + " could not be registered", ex);
}
}

Expand Down

0 comments on commit 38261cc

Please sign in to comment.