bug TDI-26749 fixed : JobScript:able to unlock an open jobscript, and delete it
git-svn-id: http://talendforge.org/svn/tos/branches/branch-5_3@106154 f6f1c999-d317-4740-80b0-e6d1abc6f99e
This commit is contained in:
@@ -93,7 +93,8 @@ Require-Bundle: org.eclipse.gef,
|
||||
org.eclipse.ui.editors,
|
||||
org.talend.libraries.csv,
|
||||
org.eclipse.ui.views.properties.tabbed,
|
||||
org.apache.log4j
|
||||
org.apache.log4j,
|
||||
org.eclipse.ui.ide
|
||||
Bundle-Activator: org.talend.core.runtime.CoreRuntimePlugin
|
||||
Bundle-ActivationPolicy: lazy
|
||||
Bundle-ClassPath: .,
|
||||
|
||||
@@ -14,6 +14,7 @@ package org.talend.core.model.repository;
|
||||
|
||||
import java.util.Set;
|
||||
|
||||
import org.eclipse.core.runtime.IPath;
|
||||
import org.eclipse.jface.preference.IPreferenceStore;
|
||||
import org.eclipse.ui.IEditorInput;
|
||||
import org.eclipse.ui.IEditorReference;
|
||||
@@ -22,6 +23,7 @@ import org.eclipse.ui.IWorkbenchPage;
|
||||
import org.eclipse.ui.IWorkbenchWindow;
|
||||
import org.eclipse.ui.PartInitException;
|
||||
import org.eclipse.ui.PlatformUI;
|
||||
import org.eclipse.ui.part.FileEditorInput;
|
||||
import org.talend.commons.exception.SystemException;
|
||||
import org.talend.commons.exception.ExceptionHandler;
|
||||
import org.talend.commons.utils.VersionUtils;
|
||||
@@ -29,6 +31,7 @@ import org.talend.core.GlobalServiceRegister;
|
||||
import org.talend.core.PluginChecker;
|
||||
import org.talend.core.model.components.IComponentsService;
|
||||
import org.talend.core.model.properties.BusinessProcessItem;
|
||||
import org.talend.core.model.properties.JobScriptItem;
|
||||
import org.talend.core.model.properties.Property;
|
||||
import org.talend.core.model.utils.RepositoryManagerHelper;
|
||||
import org.talend.core.runtime.CoreRuntimePlugin;
|
||||
@@ -330,6 +333,14 @@ public final class RepositoryManager {
|
||||
}
|
||||
}
|
||||
|
||||
}else if (objectToMove.getProperty().getItem() instanceof JobScriptItem
|
||||
&& editorInput instanceof FileEditorInput) {
|
||||
FileEditorInput rInput = (FileEditorInput) editorInput;
|
||||
IPath path = rInput.getPath();
|
||||
String[] seg = path.lastSegment().split("_");
|
||||
if (objectToMove.getProperty().getItem().getProperty().getLabel().equals(seg[0])) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user