use of com.centurylink.mdw.plugin.designer.dialogs.FrameworkUpdateDialog in project mdw-designer by CenturyLinkCloud.
the class JavaSource method beforeFileOpened.
@Override
public void beforeFileOpened() {
ProjectConfigurator projConf = new ProjectConfigurator(getProject(), MdwPlugin.getSettings());
IProgressMonitor monitor = new NullProgressMonitor();
projConf.setJava(monitor);
try {
if (getProject().isRemote() && projConf.isJavaCapable() && !projConf.hasFrameworkJars()) {
FrameworkUpdateDialog updateDlg = new FrameworkUpdateDialog(MdwPlugin.getShell(), MdwPlugin.getSettings(), getProject());
if (updateDlg.open() == Dialog.OK) {
// as
String origVer = getProject().getMdwVersion();
// reported
// by server
// or db
// for
getProject().setMdwVersion(updateDlg.getMdwVersion());
// downloading
projConf.initializeFrameworkJars();
projConf.initializeWebAppJars();
getProject().setMdwVersion(origVer);
}
} else if (!getProject().isCustomTaskManager() && !projConf.hasWebAppJars()) {
projConf.initializeWebAppJars();
}
} catch (CoreException ex) {
PluginMessages.uiError(ex, "Framework Jars", getProject());
}
}
use of com.centurylink.mdw.plugin.designer.dialogs.FrameworkUpdateDialog in project mdw-designer by CenturyLinkCloud.
the class Script method beforeFileOpened.
@Override
public void beforeFileOpened() {
if (isGroovy()) {
ProjectConfigurator projConf = new ProjectConfigurator(getProject(), MdwPlugin.getSettings());
projConf.setGroovy(new NullProgressMonitor());
try {
if (getProject().isRemote() && projConf.isJavaCapable() && !projConf.hasFrameworkJars()) {
FrameworkUpdateDialog updateDlg = new FrameworkUpdateDialog(MdwPlugin.getShell(), MdwPlugin.getSettings(), getProject());
if (updateDlg.open() == Dialog.OK) {
// as
String origVer = getProject().getMdwVersion();
// reported
// by
// server
// or db
// for
getProject().setMdwVersion(updateDlg.getMdwVersion());
// downloading
projConf.initializeFrameworkJars();
getProject().setMdwVersion(origVer);
}
}
} catch (CoreException ex) {
PluginMessages.uiError(ex, "Framework Jars", getProject());
}
}
}
use of com.centurylink.mdw.plugin.designer.dialogs.FrameworkUpdateDialog in project mdw-designer by CenturyLinkCloud.
the class JavaEditorValueProvider method beforeTempFileOpened.
@Override
public boolean beforeTempFileOpened() {
ProjectConfigurator projConf = new ProjectConfigurator(getProject(), MdwPlugin.getSettings());
projConf.setJava(new NullProgressMonitor());
try {
if (getProject().isRemote() && projConf.isJavaCapable() && !projConf.hasFrameworkJars()) {
FrameworkUpdateDialog updateDlg = new FrameworkUpdateDialog(MdwPlugin.getShell(), MdwPlugin.getSettings(), getProject());
if (updateDlg.open() == Dialog.OK) {
// as
String origVer = getProject().getMdwVersion();
// reported
// by server
// or db
// for
getProject().setMdwVersion(updateDlg.getMdwVersion());
// downloading
projConf.initializeFrameworkJars();
getProject().setMdwVersion(origVer);
}
}
} catch (CoreException ex) {
PluginMessages.uiError(ex, "Framework Jars", getProject());
}
return true;
}
use of com.centurylink.mdw.plugin.designer.dialogs.FrameworkUpdateDialog in project mdw-designer by CenturyLinkCloud.
the class ScriptEditorValueProvider method beforeTempFileOpened.
@Override
public boolean beforeTempFileOpened() {
if (isGroovy()) {
ProjectConfigurator projConf = new ProjectConfigurator(getProject(), MdwPlugin.getSettings());
projConf.setGroovy(new NullProgressMonitor());
try {
if (getProject().isRemote() && projConf.isJavaCapable() && !projConf.hasFrameworkJars()) {
FrameworkUpdateDialog updateDlg = new FrameworkUpdateDialog(MdwPlugin.getShell(), MdwPlugin.getSettings(), getProject());
if (updateDlg.open() == Dialog.OK) {
// as
String origVer = getProject().getMdwVersion();
// reported
// by
// server
// or db
// for
getProject().setMdwVersion(updateDlg.getMdwVersion());
// downloading
projConf.initializeFrameworkJars();
getProject().setMdwVersion(origVer);
}
}
} catch (CoreException ex) {
PluginMessages.uiError(ex, "Framework Jars", getProject());
}
}
return true;
}
use of com.centurylink.mdw.plugin.designer.dialogs.FrameworkUpdateDialog in project mdw-designer by CenturyLinkCloud.
the class WorkflowProject method setJava.
public boolean setJava() {
ProjectConfigurator projConf = new ProjectConfigurator(this, MdwPlugin.getSettings());
if (projConf.isJavaCapable()) {
IProgressMonitor monitor = new NullProgressMonitor();
projConf.setJava(monitor);
try {
if (!projConf.hasFrameworkJars()) {
FrameworkUpdateDialog updateDlg = new FrameworkUpdateDialog(MdwPlugin.getShell(), MdwPlugin.getSettings(), getProject());
if (updateDlg.open() == Dialog.OK) {
String origVer = getProject().getMdwVersion();
// for
getProject().setMdwVersion(updateDlg.getMdwVersion());
// downloading
projConf.initializeFrameworkJars();
projConf.initializeWebAppJars();
getProject().setMdwVersion(origVer);
}
}
} catch (Exception ex) {
PluginMessages.uiError(ex, "Open Java Source", this);
}
return true;
}
return false;
}
Aggregations