Skip to content
Browse files

Bug 333170 adding trace notes to CONFIG flow

  • Loading branch information...
1 parent 25a1b10 commit 402940611147ce2c51144a0e13c3a59b1f9a173f @jmcc0nn3ll jmcc0nn3ll committed
View
4 org.eclipse.jst.server.jetty.core/plugin.xml
@@ -257,7 +257,7 @@
</runtimeFacetMapping>
</extension>
- <!--extension point="org.eclipse.wst.server.core.installableRuntimes">
+ <extension point="org.eclipse.wst.server.core.installableRuntimes">
<runtime
id="org.eclipse.jst.server.jetty.runtime.71"
licenseUrl="http://www.apache.org/licenses/LICENSE-2.0.txt"
@@ -275,6 +275,6 @@
archiveUrl="http://download.eclipse.org/jetty/8.0.0.M2/dist/jetty-distribution-8.0.0.M2.zip"
archivePath="jetty-distribution-8.0.0.M2" />
- </extension-->
+ </extension>
</plugin>
View
76 ...t.server.jetty.ui/src/org/eclipse/jst/server/jetty/ui/internal/JettyRuntimeComposite.java
@@ -148,9 +148,9 @@ public void dispose()
* Provide a wizard page to change the Jetty installation directory.
*/
protected void createControl()
- {
- Trace.trace(Trace.CONFIG,"RuntimeComposite createControl()");
-
+ {
+ Trace.trace(Trace.CONFIG, "JettyRuntimeComposite: createControl(): start");
+
GridLayout layout = new GridLayout();
layout.numColumns = 2;
setLayout(layout);
@@ -163,6 +163,7 @@ protected void createControl()
data.horizontalSpan = 2;
label.setLayoutData(data);
+ Trace.trace(Trace.CONFIG, "JettyRuntimeComposite: createControl(): name field management");
_name = new Text(this,SWT.BORDER);
data = new GridData(GridData.FILL_HORIZONTAL);
_name.setLayoutData(data);
@@ -175,6 +176,8 @@ public void modifyText(ModifyEvent e)
}
});
+ Trace.trace(Trace.CONFIG, "JettyRuntimeComposite: createControl(): install location management");
+
label = new Label(this,SWT.NONE);
label.setText(Messages.installDir);
data = new GridData();
@@ -193,6 +196,8 @@ public void modifyText(ModifyEvent e)
}
});
+ Trace.trace(Trace.CONFIG, "JettyRuntimeComposite: createControl(): browse for location management");
+
Button browse = SWTUtil.createButton(this,Messages.browse);
browse.addSelectionListener(new SelectionAdapter()
{
@@ -207,6 +212,8 @@ public void widgetSelected(SelectionEvent se)
}
});
+ Trace.trace(Trace.CONFIG, "JettyRuntimeComposite: createControl(): installable runtime management");
+
_installLabel = new Label(this,SWT.RIGHT);
data = new GridData(GridData.FILL_HORIZONTAL);
data.horizontalIndent = 10;
@@ -221,6 +228,8 @@ public void widgetSelected(SelectionEvent se)
String license = null;
try
{
+ Trace.trace(Trace.CONFIG, "JettyRuntimeComposite: createControl(): getting license");
+
license = _installableRuntime.getLicense(new NullProgressMonitor());
}
catch (CoreException e)
@@ -239,8 +248,13 @@ protected void createChildFragments(List list)
WizardDialog dialog2 = new WizardDialog(getShell(),wizard2);
if (dialog2.open() == Window.CANCEL)
+ {
+ Trace.trace(Trace.CONFIG, "JettyRuntimeComposite: createControl(): not accepting license");
+
return;
+ }
+
DirectoryDialog dialog = new DirectoryDialog(JettyRuntimeComposite.this.getShell());
dialog.setMessage(Messages.selectInstallDir);
dialog.setFilterPath(_installDir.getText());
@@ -260,7 +274,9 @@ protected IStatus run(IProgressMonitor monitor)
{
try
{
+ Trace.trace(Trace.CONFIG, "JettyRuntimeComposite: createControl(): installable runtime job start");
_installableRuntime.install(installPath,monitor);
+ Trace.trace(Trace.CONFIG, "JettyRuntimeComposite: createControl(): installable runtime job end");
}
catch (CoreException ce)
{
@@ -276,6 +292,8 @@ protected IStatus run(IProgressMonitor monitor)
{
public void done(IJobChangeEvent event)
{
+ Trace.trace(Trace.CONFIG, "JettyRuntimeComposite: createControl(): installable runtime job done signal");
+
_installableRuntimeJob.removeJobChangeListener(this);
_installableRuntimeJob = null;
Display.getDefault().asyncExec(new Runnable()
@@ -353,10 +371,15 @@ public void widgetSelected(SelectionEvent e)
Dialog.applyDialogFont(this);
_name.forceFocus();
+
+ Trace.trace(Trace.CONFIG, "JettyRuntimeComposite: createControl(): end");
+
}
protected void updateJREs()
{
+ Trace.trace(Trace.CONFIG, "JettyRuntimeComposite: updateJRE(): start");
+
// get all installed JVMs
_installedJREs = new ArrayList<IVMInstall>();
IVMInstallType[] vmInstallTypes = JavaRuntime.getVMInstallTypes();
@@ -380,10 +403,14 @@ protected void updateJREs()
IVMInstall vmInstall = (IVMInstall)_installedJREs.get(i);
_jreNames[i + 1] = vmInstall.getName();
}
+
+ Trace.trace(Trace.CONFIG, "JettyRuntimeComposite: updateJRE(): end");
}
protected boolean showPreferencePage()
{
+ Trace.trace(Trace.CONFIG, "JettyRuntimeComposite: showPreferencePage()");
+
String id = "org.eclipse.jdt.debug.ui.preferences.VMPreferencePage";
// should be using the following API, but it only allows a single
@@ -405,22 +432,38 @@ protected boolean showPreferencePage()
protected void init()
{
+ Trace.trace(Trace.CONFIG, "JettyRuntimeComposite: init(): start");
+
if (_name == null || _jettyRuntimeWC == null)
+ {
+ Trace.trace(Trace.CONFIG, "JettyRuntimeComposite: init(): name or jetty runtime working copy is null");
+
return;
+ }
if (_runtimeWC.getName() != null)
+ {
_name.setText(_runtimeWC.getName());
+ }
else
+ {
_name.setText("");
+ }
if (_runtimeWC.getLocation() != null)
+ {
_installDir.setText(_runtimeWC.getLocation().toOSString());
+ }
else
+ {
_installDir.setText("");
+ }
- // set selection
+ Trace.trace(Trace.CONFIG, "JettyRuntimeComposite: init(): choosing initial jre");
if (_jettyRuntimeWC.isUsingDefaultJRE())
+ {
_combo.select(0);
+ }
else
{
boolean found = false;
@@ -434,26 +477,51 @@ protected void init()
found = true;
}
}
+
if (!found)
+ {
_combo.select(0);
+ }
}
+
+ Trace.trace(Trace.CONFIG, "JettyRuntimeComposite: init(): end");
+
}
protected void validate()
{
+ Trace.trace(Trace.CONFIG, "JettyRuntimeComposite: validate(): start");
+
if (_jettyRuntimeWC == null)
{
_wizard.setMessage("",IMessageProvider.ERROR);
+ Trace.trace(Trace.CONFIG, "JettyRuntimeComposite: validate(): jetty runtime working copy null");
+
return;
}
+ Trace.trace(Trace.CONFIG, "JettyRuntimeComposite: validate(): runtime working copy");
+
IStatus status = _runtimeWC.validate(null);
+
+ Trace.trace(Trace.CONFIG, "JettyRuntimeComposite: validate(): runtime working status was " + status.getMessage());
+
if (status == null || status.isOK())
+ {
_wizard.setMessage(null,IMessageProvider.NONE);
+ }
else if (status.getSeverity() == IStatus.WARNING)
+ {
_wizard.setMessage(status.getMessage(),IMessageProvider.WARNING);
+ }
else
+ {
_wizard.setMessage(status.getMessage(),IMessageProvider.ERROR);
+ }
+
_wizard.update();
+
+ Trace.trace(Trace.CONFIG, "JettyRuntimeComposite: validate(): end");
+
}
}
View
4 org.eclipse.jst.server.jetty.ui/src/org/eclipse/jst/server/jetty/ui/internal/Trace.java
@@ -42,9 +42,9 @@ private Trace()
*/
public static void trace(byte level, String s)
{
- Trace.trace(level,s,null);
+ Trace.trace(level,s,(Throwable)null);
}
-
+
/**
* Trace the given message and exception.
*

0 comments on commit 4029406

Please sign in to comment.
Something went wrong with that request. Please try again.