You are viewing a plain text version of this content. The canonical link for it is here.
Posted to scm@geronimo.apache.org by sp...@apache.org on 2005/12/04 00:20:47 UTC
svn commit: r352046 - in
/geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui:
./ META-INF/ src/org/apache/geronimo/ui/commands/
src/org/apache/geronimo/ui/sections/
Author: sppatel
Date: Sat Dec 3 15:20:40 2005
New Revision: 352046
URL: http://svn.apache.org/viewcvs?rev=352046&view=rev
Log:
loglevel section
Added:
geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/src/org/apache/geronimo/ui/commands/SetConsoleLogLevelCommand.java
Modified:
geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/META-INF/MANIFEST.MF
geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/plugin.xml
geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/src/org/apache/geronimo/ui/commands/SetHTTPPortCommand.java
geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/src/org/apache/geronimo/ui/sections/ServerEditorLogLevelSection.java
Modified: geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/META-INF/MANIFEST.MF
URL: http://svn.apache.org/viewcvs/geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/META-INF/MANIFEST.MF?rev=352046&r1=352045&r2=352046&view=diff
==============================================================================
--- geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/META-INF/MANIFEST.MF (original)
+++ geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/META-INF/MANIFEST.MF Sat Dec 3 15:20:40 2005
@@ -6,24 +6,25 @@
Bundle-Activator: org.apache.geronimo.ui.internal.GeronimoUIPlugin
Bundle-Vendor: %providerName
Bundle-Localization: plugin
-Require-Bundle: org.eclipse.core.runtime,
- org.eclipse.core.resources,
- org.eclipse.ui,
- org.eclipse.ui.forms,
- org.eclipse.ui.ide,
- org.eclipse.core.resources,
- org.eclipse.core.runtime,
- org.eclipse.core.resources,
- org.eclipse.emf.common,
- org.eclipse.emf.ecore,
- org.eclipse.wst.server.core,
- org.apache.geronimo.deployment.model,
- org.eclipse.jst.server.generic.ui,
- org.apache.geronimo.devtools.eclipse.core,
- org.eclipse.ui.editors,
- org.eclipse.ui.workbench,
- org.eclipse.ui.workbench.texteditor,
- org.eclipse.ui.browser,
- org.eclipse.wst.server.ui,
- org.eclipse.jst.server.generic.core
+Require-Bundle: org.eclipse.core.runtime,
+ org.eclipse.core.resources,
+ org.eclipse.ui,
+ org.eclipse.ui.forms,
+ org.eclipse.ui.ide,
+ org.eclipse.core.resources,
+ org.eclipse.core.runtime,
+ org.eclipse.core.resources,
+ org.eclipse.emf.common,
+ org.eclipse.emf.ecore,
+ org.eclipse.wst.server.core,
+ org.apache.geronimo.deployment.model,
+ org.eclipse.jst.server.generic.ui,
+ org.apache.geronimo.devtools.eclipse.core,
+ org.eclipse.ui.editors,
+ org.eclipse.ui.workbench,
+ org.eclipse.ui.workbench.texteditor,
+ org.eclipse.ui.browser,
+ org.eclipse.wst.server.ui,
+ org.eclipse.jst.server.generic.core,
+ org.eclipse.debug.core
Eclipse-AutoStart: true
Modified: geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/plugin.xml
URL: http://svn.apache.org/viewcvs/geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/plugin.xml?rev=352046&r1=352045&r2=352046&view=diff
==============================================================================
--- geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/plugin.xml (original)
+++ geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/plugin.xml Sat Dec 3 15:20:40 2005
@@ -99,14 +99,14 @@
</section>
</extension>
- <!-- <extension point="org.eclipse.wst.server.ui.editorPageSections">
+ <extension point="org.eclipse.wst.server.ui.editorPageSections">
<section
id="org.apache.server.geronimo.loglevel"
- order="10"
- insertionId="org.eclipse.wst.server.editor.overview.left"
+ order="20"
+ insertionId="org.eclipse.wst.server.editor.overview.right"
typeIds="org.apache.geronimo.generic.server.10"
class="org.apache.geronimo.ui.sections.ServerEditorLogLevelSection">
</section>
- </extension> -->
+ </extension>
</plugin>
Added: geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/src/org/apache/geronimo/ui/commands/SetConsoleLogLevelCommand.java
URL: http://svn.apache.org/viewcvs/geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/src/org/apache/geronimo/ui/commands/SetConsoleLogLevelCommand.java?rev=352046&view=auto
==============================================================================
--- geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/src/org/apache/geronimo/ui/commands/SetConsoleLogLevelCommand.java (added)
+++ geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/src/org/apache/geronimo/ui/commands/SetConsoleLogLevelCommand.java Sat Dec 3 15:20:40 2005
@@ -0,0 +1,101 @@
+/**
+ * Copyright 2004, 2005 The Apache Software Foundation or its licensors, as applicable
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.geronimo.ui.commands;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.debug.core.ILaunchConfiguration;
+import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
+import org.eclipse.jdt.launching.IJavaLaunchConfigurationConstants;
+import org.eclipse.wst.server.core.IServerWorkingCopy;
+import org.eclipse.wst.server.core.internal.Server;
+import org.eclipse.wst.server.ui.internal.command.ServerCommand;
+
+/**
+ * @author sppatel
+ *
+ */
+public class SetConsoleLogLevelCommand extends ServerCommand {
+
+ public static final String NONE = "--long";
+
+ public static final String INFO = "-v";
+
+ public static final String DEBUG = "-vv";
+
+ protected String value;
+
+ protected String oldValue;
+
+ private ILaunchConfigurationWorkingCopy wc = null;
+
+ /**
+ * @param server
+ * @param name
+ */
+ public SetConsoleLogLevelCommand(IServerWorkingCopy server, String value) {
+ super(server, value);
+ this.value = value;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.wst.server.ui.internal.command.ServerCommand#execute()
+ */
+ public void execute() {
+ try {
+ oldValue = getLaunchConfiguration().getAttribute(
+ IJavaLaunchConfigurationConstants.ATTR_PROGRAM_ARGUMENTS,
+ NONE);
+ if (oldValue != value) {
+ getLaunchConfiguration()
+ .setAttribute(
+ IJavaLaunchConfigurationConstants.ATTR_PROGRAM_ARGUMENTS,
+ value);
+ getLaunchConfiguration().doSave();
+ }
+ } catch (CoreException e) {
+ e.printStackTrace();
+ }
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.wst.server.ui.internal.command.ServerCommand#undo()
+ */
+ public void undo() {
+ try {
+ getLaunchConfiguration().setAttribute(
+ IJavaLaunchConfigurationConstants.ATTR_PROGRAM_ARGUMENTS,
+ oldValue);
+ } catch (CoreException e) {
+ e.printStackTrace();
+ }
+ }
+
+ private ILaunchConfigurationWorkingCopy getLaunchConfiguration()
+ throws CoreException {
+ if (wc == null) {
+ Server s = (Server) server.getAdapter(Server.class);
+ ILaunchConfiguration launchConfig = s.getLaunchConfiguration(false,
+ null);
+ wc = launchConfig.getWorkingCopy();
+ }
+ return wc;
+ }
+
+}
Modified: geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/src/org/apache/geronimo/ui/commands/SetHTTPPortCommand.java
URL: http://svn.apache.org/viewcvs/geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/src/org/apache/geronimo/ui/commands/SetHTTPPortCommand.java?rev=352046&r1=352045&r2=352046&view=diff
==============================================================================
--- geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/src/org/apache/geronimo/ui/commands/SetHTTPPortCommand.java (original)
+++ geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/src/org/apache/geronimo/ui/commands/SetHTTPPortCommand.java Sat Dec 3 15:20:40 2005
@@ -20,10 +20,6 @@
import org.eclipse.wst.server.core.IServerWorkingCopy;
import org.eclipse.wst.server.ui.internal.command.ServerCommand;
-/**
- * @author sppatel
- *
- */
public class SetHTTPPortCommand extends ServerCommand {
protected String name;
Modified: geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/src/org/apache/geronimo/ui/sections/ServerEditorLogLevelSection.java
URL: http://svn.apache.org/viewcvs/geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/src/org/apache/geronimo/ui/sections/ServerEditorLogLevelSection.java?rev=352046&r1=352045&r2=352046&view=diff
==============================================================================
--- geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/src/org/apache/geronimo/ui/sections/ServerEditorLogLevelSection.java (original)
+++ geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.ui/src/org/apache/geronimo/ui/sections/ServerEditorLogLevelSection.java Sat Dec 3 15:20:40 2005
@@ -15,6 +15,7 @@
*/
package org.apache.geronimo.ui.sections;
+import org.apache.geronimo.ui.commands.SetConsoleLogLevelCommand;
import org.apache.geronimo.ui.internal.Messages;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.SelectionEvent;
@@ -69,14 +70,31 @@
info.addSelectionListener(new SelectionListener() {
public void widgetSelected(SelectionEvent e) {
- //TODO
+ if(info.getSelection()) {
+ SetConsoleLogLevelCommand cmd = new SetConsoleLogLevelCommand(server, SetConsoleLogLevelCommand.INFO);
+ cmd.execute();
+ }
}
public void widgetDefaultSelected(SelectionEvent e) {
- //TODO
}
});
+
+ debug.addSelectionListener(new SelectionListener() {
+
+ public void widgetSelected(SelectionEvent e) {
+ if(debug.getSelection()) {
+ SetConsoleLogLevelCommand cmd = new SetConsoleLogLevelCommand(server, SetConsoleLogLevelCommand.DEBUG);
+ cmd.execute();
+ }
+ }
+
+ public void widgetDefaultSelected(SelectionEvent e) {
+ }
+
+ });
+
}
}