Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrescobar2008-10-29 04:30:22 +0000
committerrescobar2008-10-29 04:30:22 +0000
commitf29ddcf20d5f0a225128ca0de0ec1d4fe9702298 (patch)
tree5dbf3bd8d26adcaabbaaebfdfbcee883380afc3f /org.eclipse.osee.framework.ui.skynet
parent5d003608be7e0ce3fe43728f5555e5c42121b389 (diff)
downloadorg.eclipse.osee-f29ddcf20d5f0a225128ca0de0ec1d4fe9702298.tar.gz
org.eclipse.osee-f29ddcf20d5f0a225128ca0de0ec1d4fe9702298.tar.xz
org.eclipse.osee-f29ddcf20d5f0a225128ca0de0ec1d4fe9702298.zip
"Team Workflow" - 6323G - "Move OSEE client configuration to the application server"
Diffstat (limited to 'org.eclipse.osee.framework.ui.skynet')
-rw-r--r--org.eclipse.osee.framework.ui.skynet/plugin.xml11
-rw-r--r--org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/preferences/ArbitrationServerPage.java94
2 files changed, 103 insertions, 2 deletions
diff --git a/org.eclipse.osee.framework.ui.skynet/plugin.xml b/org.eclipse.osee.framework.ui.skynet/plugin.xml
index d3fb7b2a283..83c2a52b64f 100644
--- a/org.eclipse.osee.framework.ui.skynet/plugin.xml
+++ b/org.eclipse.osee.framework.ui.skynet/plugin.xml
@@ -166,8 +166,6 @@
</or>
</activeWhen>
</handler>
- <handler class="org.eclipse.osee.framework.ui.skynet.commandHandlers.ViewerReportHandler" commandId="org.eclipse.osee.framework.ui.skynet.viewerReport.command">
- </handler>
<handler class="org.eclipse.osee.framework.ui.skynet.commandHandlers.PreviewArtifactNoRecurseHandler" commandId="org.eclipse.osee.framework.ui.skynet.previewArtifact.command">
<enabledWhen>
<with
@@ -432,6 +430,15 @@
name="Configuration Details">
</page>
</extension>
+ <extension
+ point="org.eclipse.ui.preferencePages">
+ <page
+ category="org.eclipse.osee.framework.ui.skynet.OseePreferencePage"
+ class="org.eclipse.osee.framework.ui.skynet.preferences.ArbitrationServerPage"
+ id="org.eclipse.osee.framework.ui.skynet.preferences.ArbitrationServerPreferences"
+ name="Arbitration Server">
+ </page>
+ </extension>
<extension point="org.eclipse.ui.startup">
<startup class="org.eclipse.osee.framework.skynet.core.linking.HttpServerStartup"/>
</extension>
diff --git a/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/preferences/ArbitrationServerPage.java b/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/preferences/ArbitrationServerPage.java
new file mode 100644
index 00000000000..bcc89386858
--- /dev/null
+++ b/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/preferences/ArbitrationServerPage.java
@@ -0,0 +1,94 @@
+/*******************************************************************************
+ * Copyright (c) 2004, 2007 Boeing.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Boeing - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.osee.framework.ui.skynet.preferences;
+
+import java.util.logging.Level;
+import org.eclipse.jface.preference.FieldEditorPreferencePage;
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.osee.framework.logging.OseeLog;
+import org.eclipse.osee.framework.skynet.core.SkynetActivator;
+import org.eclipse.osee.framework.skynet.core.linking.HttpUrlBuilder;
+import org.eclipse.osee.framework.skynet.core.preferences.PreferenceConstants;
+import org.eclipse.osee.framework.ui.skynet.SkynetGuiPlugin;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Group;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.ui.IWorkbench;
+import org.eclipse.ui.IWorkbenchPreferencePage;
+
+/**
+ * @author Roberto E. Escobar
+ */
+public class ArbitrationServerPage extends FieldEditorPreferencePage implements IWorkbenchPreferencePage {
+
+ public ArbitrationServerPage() {
+ super(GRID);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.preference.FieldEditorPreferencePage#createFieldEditors()
+ */
+ @Override
+ protected void createFieldEditors() {
+ Composite parent = getFieldEditorParent();
+ IPreferenceStore preference = getPreferenceStore();
+
+ Composite content = new Composite(parent, SWT.NONE);
+ GridLayout layout = new GridLayout();
+ layout.marginHeight = 0;
+ layout.marginWidth = 0;
+ content.setLayout(layout);
+ content.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
+
+ Group resourceGroup = new Group(content, SWT.NONE);
+ resourceGroup.setLayout(new GridLayout());
+ resourceGroup.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
+ resourceGroup.setText("OSEE Arbitration Server");
+
+ Composite resourceComposite = new Composite(resourceGroup, SWT.NONE);
+ resourceComposite.setLayout(new GridLayout(2, false));
+ resourceComposite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
+ String defaultApplicationServer = null;
+ try {
+ defaultApplicationServer = HttpUrlBuilder.getInstance().getApplicationServerPrefix();
+ } catch (Exception ex) {
+ OseeLog.log(SkynetGuiPlugin.class, Level.SEVERE, ex.toString(), ex);
+ }
+ Label label1 = new Label(resourceComposite, SWT.NONE);
+ label1.setForeground(Display.getDefault().getSystemColor(SWT.COLOR_BLUE));
+ label1.setText("Default: ");
+
+ Label label2 = new Label(resourceComposite, SWT.NONE);
+ label2.setText(defaultApplicationServer != null ? defaultApplicationServer : "");
+
+ Group httpGroup = new Group(content, SWT.NONE);
+ httpGroup.setLayout(new GridLayout());
+ httpGroup.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
+ httpGroup.setText("Arbitration Server");
+
+ String defaultRemoteAddress = preference.getDefaultString(PreferenceConstants.ARBITRATION_SERVER);
+ addField(new DefaultWithStringAndIntegerFields(PreferenceConstants.ARBITRATION_SERVER, defaultRemoteAddress,
+ "Enter Address:", "Enter Port:", httpGroup));
+
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.IWorkbenchPreferencePage#init(org.eclipse.ui.IWorkbench)
+ */
+ public void init(IWorkbench workbench) {
+ setPreferenceStore(SkynetActivator.getInstance().getPreferenceStore());
+ setDescription("Select an arbitration server or specify a server address and port in the entry boxes below.");
+ }
+}

Back to the top