Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPauline DEVILLE2019-02-06 08:22:27 -0500
committerPauline DEVILLE2019-02-14 11:23:38 -0500
commitcc77992a69240cae3a1ed6b0fa370fdd4e332bb9 (patch)
tree84a503ead8aceda076556c8aeec74bee79481dde
parent6f2d2ead61b68bd66df104ba5ba2730d36308415 (diff)
downloadorg.eclipse.papyrus-cc77992a69240cae3a1ed6b0fa370fdd4e332bb9.tar.gz
org.eclipse.papyrus-cc77992a69240cae3a1ed6b0fa370fdd4e332bb9.tar.xz
org.eclipse.papyrus-cc77992a69240cae3a1ed6b0fa370fdd4e332bb9.zip
Bug 544183 - [releng][tools] https update site are not change into
file:/home/data/httpd/ during generation of target files Change-Id: Id7871d3432ff0993e644795983471eceeaf24549 Signed-off-by: Pauline DEVILLE <pauline.deville@cea.fr>
-rw-r--r--plugins/toolsmiths/org.eclipse.papyrus.releng.tools/src/org/eclipse/papyrus/releng/tools/internal/Messages.java9
-rw-r--r--plugins/toolsmiths/org.eclipse.papyrus.releng.tools/src/org/eclipse/papyrus/releng/tools/internal/messages.properties9
-rw-r--r--plugins/toolsmiths/org.eclipse.papyrus.releng.tools/src/org/eclipse/papyrus/releng/tools/internal/popup/actions/GenerateTargetsHandler.java30
3 files changed, 34 insertions, 14 deletions
diff --git a/plugins/toolsmiths/org.eclipse.papyrus.releng.tools/src/org/eclipse/papyrus/releng/tools/internal/Messages.java b/plugins/toolsmiths/org.eclipse.papyrus.releng.tools/src/org/eclipse/papyrus/releng/tools/internal/Messages.java
index 8611c18b6b6..0ecb3b4a14f 100644
--- a/plugins/toolsmiths/org.eclipse.papyrus.releng.tools/src/org/eclipse/papyrus/releng/tools/internal/Messages.java
+++ b/plugins/toolsmiths/org.eclipse.papyrus.releng.tools/src/org/eclipse/papyrus/releng/tools/internal/Messages.java
@@ -16,6 +16,15 @@ import org.eclipse.osgi.util.NLS;
public class Messages extends NLS {
private static final String BUNDLE_NAME = "org.eclipse.papyrus.releng.tools.internal.messages"; //$NON-NLS-1$
+ public static String GenerateTargetsHandler_GenerateTarget;
+ public static String GenerateTargetsHandler_GenerateTargetFile;
+ public static String GenerateTargetsHandler_GenerateTargetPlatformFor;
+ public static String GenerateTargetsHandler_OperationCanceled;
+ public static String GenerateTargetsHandler_OperationComplete;
+ public static String GenerateTargetsHandler_OperationCompleteWithError;
+ public static String GenerateTargetsHandler_OperationCompleteWithWarning;
+ public static String GenerateTargetsHandler_UnexpectedError;
+ public static String GenerateTargetsHandler_UnexpectedException;
public static String UpdateRMapAction_mapWasUpdatedTitle;
public static String UpdateRMapAction_chooseBuildModel;
public static String UpdateRMapAction_chooseBuildModelLong;
diff --git a/plugins/toolsmiths/org.eclipse.papyrus.releng.tools/src/org/eclipse/papyrus/releng/tools/internal/messages.properties b/plugins/toolsmiths/org.eclipse.papyrus.releng.tools/src/org/eclipse/papyrus/releng/tools/internal/messages.properties
index 52ac9606699..6bde69a7175 100644
--- a/plugins/toolsmiths/org.eclipse.papyrus.releng.tools/src/org/eclipse/papyrus/releng/tools/internal/messages.properties
+++ b/plugins/toolsmiths/org.eclipse.papyrus.releng.tools/src/org/eclipse/papyrus/releng/tools/internal/messages.properties
@@ -11,6 +11,15 @@
# Nicolas Bros (Mia-Software) - Bug 366567 - [Releng] Tool to update rmaps
# Christian W. Damus - Support updating of multiple selected files
###############################################################################
+GenerateTargetsHandler_GenerateTargetFile=Generate %s target files
+GenerateTargetsHandler_GenerateTargetPlatformFor=Generate Target Platform for
+GenerateTargetsHandler_OperationCanceled=Operation canceled
+GenerateTargetsHandler_OperationComplete=Operation complete
+GenerateTargetsHandler_OperationCompleteWithError=The operation completed with errors. Check error log for details
+GenerateTargetsHandler_OperationCompleteWithWarning=The operation completed with warnings. Check error log for details
+GenerateTargetsHandler_UnexpectedError=Unexpected error
+GenerateTargetsHandler_UnexpectedException=Unexpected exception
+GenerateTargetsHandler_GenerateTarget=Generate Targets
UpdateRMapAction_mapWasUpdatedTitle=Papyrus Releng Tools
UpdateRMapAction_chooseBuildModel=Choose build model
UpdateRMapAction_chooseBuildModelLong=Select the build model with which to update dependencies:
diff --git a/plugins/toolsmiths/org.eclipse.papyrus.releng.tools/src/org/eclipse/papyrus/releng/tools/internal/popup/actions/GenerateTargetsHandler.java b/plugins/toolsmiths/org.eclipse.papyrus.releng.tools/src/org/eclipse/papyrus/releng/tools/internal/popup/actions/GenerateTargetsHandler.java
index 0cf5edd9a0a..be980aab70d 100644
--- a/plugins/toolsmiths/org.eclipse.papyrus.releng.tools/src/org/eclipse/papyrus/releng/tools/internal/popup/actions/GenerateTargetsHandler.java
+++ b/plugins/toolsmiths/org.eclipse.papyrus.releng.tools/src/org/eclipse/papyrus/releng/tools/internal/popup/actions/GenerateTargetsHandler.java
@@ -52,6 +52,7 @@ import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.papyrus.releng.tools.internal.Activator;
+import org.eclipse.papyrus.releng.tools.internal.Messages;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.ui.handlers.HandlerUtil;
@@ -107,7 +108,7 @@ public class GenerateTargetsHandler extends AbstractHandler {
if (!tpdFiles.isEmpty()) {
new UpdateDependencies().updateDependencies(tpdFiles, activeShell); // Update all TPD Files from Simrel
- String jobTitle = String.format("Generate %s target files", tpdFiles.size());
+ String jobTitle = String.format(Messages.GenerateTargetsHandler_GenerateTargetFile, tpdFiles.size());
Job topLevelJob = new Job(jobTitle) {
/**
* @see org.eclipse.core.runtime.jobs.Job#run(org.eclipse.core.runtime.IProgressMonitor)
@@ -119,7 +120,7 @@ public class GenerateTargetsHandler extends AbstractHandler {
protected IStatus run(IProgressMonitor monitor) {
int maxThreads = 2; // Multi-threading is not really relevant, most time is spent in downloading artifacts
- JobGroup tpdConverters = new JobGroup("Generate Targets", maxThreads, tpdFiles.size());
+ JobGroup tpdConverters = new JobGroup(Messages.GenerateTargetsHandler_GenerateTarget, maxThreads, tpdFiles.size());
for (IFile tpdFile : tpdFiles) {
generate(tpdFile, tpdConverters); // Generate *.target files
}
@@ -127,7 +128,7 @@ public class GenerateTargetsHandler extends AbstractHandler {
try {
tpdConverters.join(0, monitor);
} catch (InterruptedException e) {
- return new Status(IStatus.ERROR, Activator.PLUGIN_ID, "Unexpected exception", e);
+ return new Status(IStatus.ERROR, Activator.PLUGIN_ID, Messages.GenerateTargetsHandler_UnexpectedException, e);
}
return tpdConverters.getResult();
@@ -153,20 +154,20 @@ public class GenerateTargetsHandler extends AbstractHandler {
}
void done(IStatus status) {
- String title = "Generate targets";
+ String title = Messages.GenerateTargetsHandler_GenerateTarget;
switch (status.getCode()) {
case IStatus.OK:
case IStatus.INFO:
- MessageDialog.openInformation(activeShell, title, "Operation complete");
+ MessageDialog.openInformation(activeShell, title, Messages.GenerateTargetsHandler_OperationComplete);
break;
case IStatus.CANCEL:
- MessageDialog.openInformation(activeShell, title, "Operation canceled");
+ MessageDialog.openInformation(activeShell, title, Messages.GenerateTargetsHandler_OperationCanceled);
break;
case IStatus.ERROR:
- MessageDialog.openError(activeShell, title, "The operation completed with errors. Check error log for details");
+ MessageDialog.openError(activeShell, title, Messages.GenerateTargetsHandler_OperationCompleteWithError);
break;
case IStatus.WARNING:
- MessageDialog.openWarning(activeShell, title, "The operation completed with warnings. Check error log for details");
+ MessageDialog.openWarning(activeShell, title, Messages.GenerateTargetsHandler_OperationCompleteWithWarning);
break;
}
}
@@ -175,7 +176,7 @@ public class GenerateTargetsHandler extends AbstractHandler {
}
} catch (CoreException e) {
- Activator.getDefault().getLog().log(new Status(IStatus.ERROR, Activator.PLUGIN_ID, "Unexpected exception", e));
+ Activator.getDefault().getLog().log(new Status(IStatus.ERROR, Activator.PLUGIN_ID, Messages.GenerateTargetsHandler_UnexpectedException, e));
}
}
@@ -239,7 +240,7 @@ public class GenerateTargetsHandler extends AbstractHandler {
Injector injector = TargetplatformActivator.getInstance().getInjector(TargetplatformActivator.ORG_ECLIPSE_CBI_TARGETPLATFORM_TARGETPLATFORM);
injector.injectMembers(converter);
- Job job = new Job("Generate Target Platform for " + file.getLocation().lastSegment()) {
+ Job job = new Job(Messages.GenerateTargetsHandler_GenerateTargetPlatformFor + file.getLocation().lastSegment()) {
@Override
protected IStatus run(IProgressMonitor monitor) {
@@ -252,7 +253,7 @@ public class GenerateTargetsHandler extends AbstractHandler {
file.getParent().refreshLocal(IResource.DEPTH_ONE, null);
generateEclipseTarget(file);
} catch (CoreException ex) {
- return new Status(IStatus.ERROR, Activator.PLUGIN_ID, "Unexpected exception", ex);//$NON-NLS-1$
+ return new Status(IStatus.ERROR, Activator.PLUGIN_ID, Messages.GenerateTargetsHandler_UnexpectedException, ex);
}
return BasicDiagnostic.toIStatus(result);
@@ -288,9 +289,10 @@ public class GenerateTargetsHandler extends AbstractHandler {
eclipseFolder.create(true, true, new NullProgressMonitor());
}
- IFile eclipseTargetFile = eclipseFolder.getFile(fileName.replaceAll("portable", targetSuffix));
+ IFile eclipseTargetFile = eclipseFolder.getFile(fileName.replaceAll("portable", targetSuffix)); //$NON-NLS-1$
- InputStream convertedStream = convert(portableTargetFile.getContents(), "http://download.eclipse.org/", "file:/home/data/httpd/download.eclipse.org/");
+ InputStream convertedStream = convert(portableTargetFile.getContents(), "http://download.eclipse.org/", "file:/home/data/httpd/download.eclipse.org/"); //$NON-NLS-1$ //$NON-NLS-2$
+ convertedStream = convert(convertedStream, "https://download.eclipse.org/", "file:/home/data/httpd/download.eclipse.org/"); //$NON-NLS-1$ //$NON-NLS-2$
if (eclipseTargetFile.exists()) {
@@ -328,7 +330,7 @@ public class GenerateTargetsHandler extends AbstractHandler {
builder.append(newLine).append("\n"); //$NON-NLS-1$
}
} catch (IOException ex) {
- throw new CoreException(new Status(IStatus.ERROR, Activator.PLUGIN_ID, "Unexpected error", ex));
+ throw new CoreException(new Status(IStatus.ERROR, Activator.PLUGIN_ID, Messages.GenerateTargetsHandler_UnexpectedError, ex));
}
ByteArrayInputStream result = new ByteArrayInputStream(builder.toString().getBytes());

Back to the top