diff options
author | Andrew M Finkbeiner | 2012-11-27 17:30:16 +0000 |
---|---|---|
committer | Andrew M Finkbeiner | 2012-11-27 17:30:16 +0000 |
commit | 2e52a2eab15eb1ae2d584ca885d670f5d946885b (patch) | |
tree | c7b301dbe77d4c6510f1848b9306689a1bffa4fe /plugins/org.eclipse.osee.ote.ui.test.manager | |
parent | f2d76718e77d7987e1c688ab29e0e882c1ff7483 (diff) | |
download | org.eclipse.osee-2e52a2eab15eb1ae2d584ca885d670f5d946885b.tar.gz org.eclipse.osee-2e52a2eab15eb1ae2d584ca885d670f5d946885b.tar.xz org.eclipse.osee-2e52a2eab15eb1ae2d584ca885d670f5d946885b.zip |
feature[bgz_394717]: Update test manager for new widget
Diffstat (limited to 'plugins/org.eclipse.osee.ote.ui.test.manager')
10 files changed, 76 insertions, 451 deletions
diff --git a/plugins/org.eclipse.osee.ote.ui.test.manager/src/org/eclipse/osee/ote/ui/test/manager/core/ITestManagerModel.java b/plugins/org.eclipse.osee.ote.ui.test.manager/src/org/eclipse/osee/ote/ui/test/manager/core/ITestManagerModel.java new file mode 100644 index 00000000000..46408880c7b --- /dev/null +++ b/plugins/org.eclipse.osee.ote.ui.test.manager/src/org/eclipse/osee/ote/ui/test/manager/core/ITestManagerModel.java @@ -0,0 +1,17 @@ +package org.eclipse.osee.ote.ui.test.manager.core; + +import org.eclipse.osee.framework.jdk.core.type.Pair; + +public interface ITestManagerModel { + + public abstract boolean hasParseExceptions(); + + public abstract Pair<Integer, Integer> getParseErrorRange(); + + public abstract String getParseError(); + + public abstract boolean setFromXml(String xmlText); + + public abstract String getRawXml(); + +}
\ No newline at end of file diff --git a/plugins/org.eclipse.osee.ote.ui.test.manager/src/org/eclipse/osee/ote/ui/test/manager/core/PageManager.java b/plugins/org.eclipse.osee.ote.ui.test.manager/src/org/eclipse/osee/ote/ui/test/manager/core/PageManager.java index 36934c0cccc..203f582924c 100644 --- a/plugins/org.eclipse.osee.ote.ui.test.manager/src/org/eclipse/osee/ote/ui/test/manager/core/PageManager.java +++ b/plugins/org.eclipse.osee.ote.ui.test.manager/src/org/eclipse/osee/ote/ui/test/manager/core/PageManager.java @@ -12,12 +12,12 @@ package org.eclipse.osee.ote.ui.test.manager.core; import java.util.ArrayList; import java.util.List; + import org.eclipse.osee.framework.jdk.core.util.Strings; import org.eclipse.osee.ote.service.ConnectionEvent; import org.eclipse.osee.ote.ui.test.manager.ITestManagerFactory; import org.eclipse.osee.ote.ui.test.manager.pages.AdvancedPage; import org.eclipse.osee.ote.ui.test.manager.pages.HostPage; -import org.eclipse.osee.ote.ui.test.manager.pages.OverviewPage; import org.eclipse.osee.ote.ui.test.manager.pages.ScriptPage; import org.eclipse.osee.ote.ui.test.manager.pages.TestManagerPage; import org.eclipse.swt.SWT; @@ -30,7 +30,6 @@ public class PageManager { protected AdvancedPage advancedPage; protected HostPage hostPage; - protected OverviewPage overviewPage; protected ScriptPage scriptPage; private final List<TestManagerPage> pages; @@ -44,9 +43,6 @@ public class PageManager { } protected void createPages(Composite parent) { - overviewPage = new OverviewPage(parent, SWT.NONE, testManager); - registerPage(overviewPage); - hostPage = new HostPage(parent, SWT.NONE, testManager); registerPage(hostPage); @@ -108,13 +104,6 @@ public class PageManager { } /** - * @return the overviewPage - */ - public OverviewPage getOverviewPage() { - return overviewPage; - } - - /** * @return the scriptPage */ public ScriptPage getScriptPage() { @@ -180,7 +169,4 @@ public class PageManager { return problemEncountered; } - public void refreshPages() { - overviewPage.refresh(); - } } diff --git a/plugins/org.eclipse.osee.ote.ui.test.manager/src/org/eclipse/osee/ote/ui/test/manager/core/TestManagerEditor.java b/plugins/org.eclipse.osee.ote.ui.test.manager/src/org/eclipse/osee/ote/ui/test/manager/core/TestManagerEditor.java index 6efce243252..7776a029e84 100644 --- a/plugins/org.eclipse.osee.ote.ui.test.manager/src/org/eclipse/osee/ote/ui/test/manager/core/TestManagerEditor.java +++ b/plugins/org.eclipse.osee.ote.ui.test.manager/src/org/eclipse/osee/ote/ui/test/manager/core/TestManagerEditor.java @@ -17,18 +17,24 @@ import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import java.util.logging.Level; + import org.eclipse.core.resources.IFile; import org.eclipse.core.runtime.CoreException; import org.eclipse.core.runtime.IPath; import org.eclipse.core.runtime.IProgressMonitor; +import org.eclipse.core.runtime.NullProgressMonitor; import org.eclipse.core.runtime.Platform; import org.eclipse.core.runtime.QualifiedName; import org.eclipse.jface.dialogs.ErrorDialog; import org.eclipse.jface.dialogs.MessageDialog; +import org.eclipse.jface.text.IDocument; +import org.eclipse.jface.text.TextSelection; import org.eclipse.osee.connection.service.IServiceConnector; import org.eclipse.osee.framework.jdk.core.type.IPropertyStore; +import org.eclipse.osee.framework.jdk.core.type.Pair; import org.eclipse.osee.framework.jdk.core.type.PropertyStore; import org.eclipse.osee.framework.jdk.core.util.Lib; +import org.eclipse.osee.framework.logging.OseeLog; import org.eclipse.osee.framework.plugin.core.util.OseeData; import org.eclipse.osee.framework.ui.swt.Displays; import org.eclipse.osee.framework.ui.swt.ImageManager; @@ -77,7 +83,7 @@ public abstract class TestManagerEditor extends MultiPageEditorPart implements I private int lastPageIndex = 0; - private final TestManagerModel model; + private final ITestManagerModel model; private boolean reloadSourcePage = false; @@ -91,8 +97,6 @@ public abstract class TestManagerEditor extends MultiPageEditorPart implements I private IFile thisIFile = null; - private String xmlText; - private final IPropertyStore propertyStore; private final PageManager pageManager; @@ -101,12 +105,12 @@ public abstract class TestManagerEditor extends MultiPageEditorPart implements I private IServiceConnector connector = null; private IHostTestEnvironment connectedHost; - public TestManagerEditor(final ITestManagerFactory testManagerFactory) { + public TestManagerEditor(final ITestManagerFactory testManagerFactory, ITestManagerModel model) { super(); this.testManagerFactory = testManagerFactory; this.pageManager = new PageManager(testManagerFactory, this); - this.model = new TestManagerModel(); + this.model = model; this.propertyStore = new PropertyStore(testManagerFactory.getClass().getSimpleName()); } @@ -216,7 +220,7 @@ public abstract class TestManagerEditor extends MultiPageEditorPart implements I /** * @return Returns the model. */ - public TestManagerModel getModel() { + public ITestManagerModel getModel() { return model; } @@ -313,15 +317,14 @@ public abstract class TestManagerEditor extends MultiPageEditorPart implements I private void readXmlData() { TestManagerPlugin.log(Level.INFO, "readXmlData"); IEditorInput coreinput = getEditorInput(); + String xmlText = ""; if (coreinput instanceof IFileEditorInput) { IFileEditorInput input = (IFileEditorInput) getEditorInput(); thisIFile = input.getFile(); String name = thisIFile.getName(); this.setPartName(name); - model.setConfiguration(name); if (thisIFile != null) { IPath containerPath = thisIFile.getRawLocation(); - model.filename = containerPath.toOSString(); try { xmlText = Lib.inputStreamToString(thisIFile.getContents()); @@ -335,9 +338,9 @@ public abstract class TestManagerEditor extends MultiPageEditorPart implements I TestManagerInput input = (TestManagerInput) getEditorInput(); String name = "TestManager"; this.setPartName(name); - model.setConfiguration(name); xmlText = input.getDefaultXML(); } + model.setFromXml(xmlText); } /** @@ -347,25 +350,20 @@ public abstract class TestManagerEditor extends MultiPageEditorPart implements I protected void createPages() { readXmlData(); - if (model.setFromXml(xmlText)) { - pageManager.createPages(getContainer()); - pageSourceCreate(); + pageManager.createPages(getContainer()); + pageSourceCreate(); - fileIsDirty = false; - reloadSourcePage = false; - pageSourceCheck(); - restoreSettings(); - } + fileIsDirty = false; + reloadSourcePage = false; + pageSourceCheck(); + restoreSettings(); + // If parse errors, send to sourcePage and set error on page - else { + if (model.hasParseExceptions()) { if (sourceEditor == null) { pageSourceCreate(); - setActivePage(sourcePage); - return; } - pageSourceCheck(); - setPageImage(sourcePage, errorImage); - setActivePage(sourcePage); + handleSourceEditorError(); } fileIsDirty = false; firePropertyChange(PROP_DIRTY); @@ -400,10 +398,7 @@ public abstract class TestManagerEditor extends MultiPageEditorPart implements I if (lastPageIndex == sourcePage) { // if parse error, goto source and error if (!model.setFromXml(newXml)) { - setActivePage(sourcePage); - setPageError(sourcePage, true); - MessageDialog.openError(getSite().getShell(), "Source Page Error", - "Error parsing Source page\n\n" + model.getParseExceptions()); + handleSourceEditorError(); return; } setPageError(sourcePage, false); @@ -413,6 +408,30 @@ public abstract class TestManagerEditor extends MultiPageEditorPart implements I lastPageIndex = newPageIndex; } + private void handleSourceEditorError() { + if (model.hasParseExceptions()) { + try { + setActivePage(sourcePage); + pageSourceCheck(); + MessageDialog.openError(getSite().getShell(), "Source Page Error", + "Error parsing Source page\n "+model.getParseError()); + Pair<Integer, Integer> parseErrorRange = model.getParseErrorRange(); + sourceEditor.setHighlightRange(parseErrorRange.getFirst(), parseErrorRange.getSecond(), false); + sourceEditor.getSelectionProvider().setSelection(new TextSelection(parseErrorRange.getFirst(), parseErrorRange.getSecond())); + } catch (Throwable th) {} + } + } + + public void updateFromTestManagerModel() { + IDocument doc = sourceEditor.getDocumentProvider().getDocument(sourceEditor.getEditorInput()); + doc.set(model.getRawXml()); + try { + sourceEditor.getDocumentProvider().saveDocument(new NullProgressMonitor(), null, doc, true); + } catch (CoreException e) { + OseeLog.log(getClass(), Level.SEVERE, e); + } + } + void pageSourceCreate() { try { if (getEditorInput() instanceof IFileEditorInput) { @@ -436,8 +455,6 @@ public abstract class TestManagerEditor extends MultiPageEditorPart implements I } public void doSave() { - readXmlData(); - model.setFromXml(xmlText); pageManager.save(); OutputStream outputStream = null; try { @@ -455,7 +472,6 @@ public abstract class TestManagerEditor extends MultiPageEditorPart implements I } } } - pageManager.refreshPages(); } public void restoreSettings() { diff --git a/plugins/org.eclipse.osee.ote.ui.test.manager/src/org/eclipse/osee/ote/ui/test/manager/core/TestManagerModel.java b/plugins/org.eclipse.osee.ote.ui.test.manager/src/org/eclipse/osee/ote/ui/test/manager/core/TestManagerModel.java deleted file mode 100644 index d40415631a7..00000000000 --- a/plugins/org.eclipse.osee.ote.ui.test.manager/src/org/eclipse/osee/ote/ui/test/manager/core/TestManagerModel.java +++ /dev/null @@ -1,227 +0,0 @@ -/******************************************************************************* - * 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.ote.ui.test.manager.core; - -import java.io.File; -import java.io.IOException; -import java.io.StringReader; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.logging.Level; -import javax.xml.parsers.DocumentBuilderFactory; -import javax.xml.parsers.ParserConfigurationException; -import org.eclipse.osee.framework.jdk.core.util.Lib; -import org.eclipse.osee.framework.logging.OseeLog; -import org.eclipse.osee.ote.ui.test.manager.internal.TestManagerPlugin; -import org.w3c.dom.Document; -import org.w3c.dom.Node; -import org.w3c.dom.NodeList; -import org.xml.sax.InputSource; -import org.xml.sax.SAXException; - -/** - * Base Class for all TestManagers - */ -public class TestManagerModel { - - final static String CONFIGURATION = "configuration"; - final static String CONTACT = "contact"; - final static String DESCRIPTION = "description"; - final static String DISTRIBUTION_STATEMENT = "distributionStatement"; - final static String OFP = "ofp"; - final static String ROOTNAME = "testManager"; - public boolean finished = false; - private String configuration = ""; - private String contact = ""; - private String description = ""; - private String distributionStatement = ""; - private String[] ofps = null; - private final List<String> parseExceptions = new ArrayList<String>(); - private String rawXml = ""; - protected String filename = ""; - private final Map<String, String> defaultOfpExe = new HashMap<String, String>(); - - public TestManagerModel() { - } - - /** - * @return Returns the configuration. - */ - public String getConfiguration() { - return configuration; - } - - /** - * @return Returns the contact. - */ - public String getContact() { - return contact; - } - - /** - * @return Returns the description. - */ - public String getDescription() { - return description; - } - - /** - * @return Returns the distribution statement. - */ - public String getDistributionStatement() { - return distributionStatement; - } - - /** - * @return Returns the ofps. - */ - public String[] getOfps() { - return ofps; - } - - /** - * @return Returns the parseExceptions. - */ - public String getParseExceptions() { - String str = ""; - for (int i = 0; i < parseExceptions.size(); i++) { - str += parseExceptions.get(i) + "\n"; - } - return str; - } - - /** - * @return Returns the rawXml. - */ - public String getRawXml() { - return rawXml; - } - - public boolean hasParseExceptions() { - return !parseExceptions.isEmpty(); - } - - /** - * @param configuration The configuration to set. - */ - public void setConfiguration(String configuration) { - this.configuration = configuration; - } - - /** - * @param contact The contact to set. - */ - public void setContact(String contact) { - this.contact = contact; - } - - /** - * @param description The description to set. - */ - public void setDescription(String description) { - this.description = description; - } - - /** - * @param distributionStatement The distribution statement to set. - */ - public void setDistributionStatement(String distributionStatement) { - this.distributionStatement = distributionStatement; - } - - /** - * load model from xmlString; return true if successful - */ - public boolean setFromXml(String xmlString) { - parseExceptions.clear(); - try { - // Create a DOM builder and parse the fragment - DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); - - // Call this to catch parse errors - - Document document = factory.newDocumentBuilder().parse(new InputSource(new StringReader(xmlString))); - - parseDocument(xmlString, document); - - } catch (ParserConfigurationException e) { - OseeLog.log(TestManagerPlugin.class, Level.SEVERE, e.toString()); - parseExceptions.add(e.toString()); - return false; - } catch (SAXException e) { - OseeLog.log(TestManagerPlugin.class, Level.SEVERE, e.toString()); - OseeLog.log(TestManagerPlugin.class, Level.SEVERE, "xmlText *" + xmlString + "*"); - parseExceptions.add(e.toString()); - return false; - } catch (IOException e) { - OseeLog.log(TestManagerPlugin.class, Level.SEVERE, e.toString()); - parseExceptions.add(e.toString()); - return false; - } - rawXml = xmlString; - return true; - } - - /** - * load model from filename - * - * @param filename the Name of the file to be read - * @throws IOException - */ - public void setFromXmlFile(String filename) throws IOException { - this.filename = filename; - setFromXml(Lib.fileToString(new File(filename))); - } - - /** - * @param ofps The ofps to set. - */ - public void setOfps(String[] ofps) { - this.ofps = ofps; - } - - private void parseDocument(String xmlString, Document document) { - NodeList nodeList = document.getFirstChild().getChildNodes(); - List<String> ofpList = new ArrayList<String>(); - defaultOfpExe.clear(); - for (int i = 0; i < nodeList.getLength(); i++) { - Node node = nodeList.item(i); - if (node.getNodeName().equals(DESCRIPTION)) { - description = node.getTextContent(); - } else if (node.getNodeName().equals(DISTRIBUTION_STATEMENT)) { - distributionStatement = node.getTextContent(); - } else if (node.getNodeName().equals(CONTACT)) { - contact = node.getTextContent(); - } else if (node.getNodeName().equals(OFP)) { - Node defaultType = node.getAttributes().getNamedItem("default"); - if (defaultType != null) { - String defaultTypeAsString = defaultType.getNodeValue(); - defaultOfpExe.put("default_" + defaultTypeAsString, node.getTextContent().trim()); - } - ofpList.add(node.getTextContent().trim()); - } - } - - ofps = ofpList.toArray(new String[ofpList.size()]);// AXml.getTagDataArray(xmlString, OFP); - OseeLog.log(TestManagerPlugin.class, Level.INFO, "description *" + description + "*"); - OseeLog.log(TestManagerPlugin.class, Level.INFO, "distribution statement *" + distributionStatement + "*"); - OseeLog.log(TestManagerPlugin.class, Level.INFO, "contact *" + contact + "*"); - for (int i = 0; i < ofps.length; i++) { - OseeLog.log(TestManagerPlugin.class, Level.INFO, "ofp *" + ofps[i] + "*"); - } - } - - public Map<String, String> getOfpDefault() { - return defaultOfpExe; - } -} diff --git a/plugins/org.eclipse.osee.ote.ui.test.manager/src/org/eclipse/osee/ote/ui/test/manager/pages/HostPage.java b/plugins/org.eclipse.osee.ote.ui.test.manager/src/org/eclipse/osee/ote/ui/test/manager/pages/HostPage.java index 9bb8208e109..4ad76fa6820 100644 --- a/plugins/org.eclipse.osee.ote.ui.test.manager/src/org/eclipse/osee/ote/ui/test/manager/pages/HostPage.java +++ b/plugins/org.eclipse.osee.ote.ui.test.manager/src/org/eclipse/osee/ote/ui/test/manager/pages/HostPage.java @@ -47,7 +47,7 @@ public class HostPage extends TestManagerPage { hostGroup.setText("Double click a Host to Connect/Disconnect"); getTestManager().createHostWidget(hostGroup); - computeScrollSize(); + setMinSize(0, 0); } @Override diff --git a/plugins/org.eclipse.osee.ote.ui.test.manager/src/org/eclipse/osee/ote/ui/test/manager/pages/OverviewPage.java b/plugins/org.eclipse.osee.ote.ui.test.manager/src/org/eclipse/osee/ote/ui/test/manager/pages/OverviewPage.java deleted file mode 100644 index d125b25fea1..00000000000 --- a/plugins/org.eclipse.osee.ote.ui.test.manager/src/org/eclipse/osee/ote/ui/test/manager/pages/OverviewPage.java +++ /dev/null @@ -1,173 +0,0 @@ -/******************************************************************************* - * 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.ote.ui.test.manager.pages; - -import java.util.HashMap; -import java.util.Map; -import org.eclipse.jface.layout.GridDataFactory; -import org.eclipse.osee.framework.ui.plugin.util.HelpUtil; -import org.eclipse.osee.ote.service.ConnectionEvent; -import org.eclipse.osee.ote.ui.test.manager.core.TestManagerEditor; -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.Label; - -/** - * @author David Diepenbrock - */ -public class OverviewPage extends TestManagerPage { - - private static final String pageName = "Overview"; - private static final String release = ""; - Map<LabelEnum, Label> labelMap; - - private enum LabelEnum { - TM_Release("This Test Manager will only work with TM Server Release " + release), - Configuration, - Contact, - Description, - Distribution_Statement; - - private String toolTip; - - LabelEnum() { - this(""); - } - - LabelEnum(String toolTip) { - this.toolTip = toolTip; - } - - public String getToolTipText() { - return toolTip; - } - - @Override - public String toString() { - return name().replaceAll("_", " "); - } - } - - /** - * Creates and populates the Overview Page - */ - public OverviewPage(Composite parent, int style, TestManagerEditor parentTestManager) { - super(parent, style, parentTestManager); - createPage(); - updateLabelText(); - computeScrollSize(); - - // TODO: Change to use OteHelpContext - HelpUtil.setHelp(this, "test_manager_overview_page", "org.eclipse.osee.ote.help.ui"); - } - - /** - * @return Returns the pageName. - */ - @Override - public String getPageName() { - return pageName; - } - - /** - * Refreshes the label's text based upon the test manager's model. - */ - public void updateLabelText() { - for (LabelEnum enumEntry : LabelEnum.values()) { - String toSet = ""; - Label label = labelMap.get(enumEntry); - switch (enumEntry) { - case TM_Release: - toSet = release; - break; - case Configuration: - toSet = getTestManager().getModel().getConfiguration(); - break; - case Contact: - toSet = getTestManager().getModel().getContact(); - break; - case Description: - toSet = getTestManager().getModel().getDescription(); - break; - case Distribution_Statement: - toSet = getTestManager().getModel().getDistributionStatement(); - break; - default: - break; - } - label.setText(toSet); - } - } - - @Override - protected void createPage() { - super.createPage(); - Composite parent = (Composite) getContent(); - Composite composite = new Composite(parent, SWT.NONE); - composite.setLayout(new GridLayout(2, false)); - composite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false)); - - labelMap = new HashMap<LabelEnum, Label>(); - for (LabelEnum enumEntry : LabelEnum.values()) { - Label label = new Label(composite, SWT.NONE); - label.setText(enumEntry.toString() + ": "); - GridDataFactory.fillDefaults().align(SWT.FILL, SWT.TOP).applyTo(label); - - Label updateableLabel = new Label(composite, SWT.NONE); - updateableLabel.setToolTipText(enumEntry.getToolTipText()); - - labelMap.put(enumEntry, updateableLabel); - } - } - - @Override - public boolean areSettingsValidForRun() { - return true; - } - - @Override - public void restoreData() { - // Do Nothing - } - - @Override - public void saveData() { - // Do Nothing - } - - @Override - public String getErrorMessage() { - return ""; - } - - @Override - public boolean onConnection(ConnectionEvent event) { - return false; - } - - @Override - public boolean onDisconnect(ConnectionEvent event) { - return false; - - } - - @Override - public boolean onConnectionLost() { - return false; - } - - public void refresh() { - updateLabelText(); - } - -} diff --git a/plugins/org.eclipse.osee.ote.ui.test.manager/src/org/eclipse/osee/ote/ui/test/manager/pages/ScriptPage.java b/plugins/org.eclipse.osee.ote.ui.test.manager/src/org/eclipse/osee/ote/ui/test/manager/pages/ScriptPage.java index ee3ff6285bf..040c1698160 100644 --- a/plugins/org.eclipse.osee.ote.ui.test.manager/src/org/eclipse/osee/ote/ui/test/manager/pages/ScriptPage.java +++ b/plugins/org.eclipse.osee.ote.ui.test.manager/src/org/eclipse/osee/ote/ui/test/manager/pages/ScriptPage.java @@ -14,6 +14,7 @@ import java.rmi.RemoteException; import java.util.Timer; import java.util.TimerTask; import java.util.logging.Level; + import org.eclipse.core.runtime.jobs.Job; import org.eclipse.jface.dialogs.MessageDialog; import org.eclipse.osee.framework.jdk.core.util.Lib; @@ -101,8 +102,8 @@ public abstract class ScriptPage extends TestManagerPage { createStatusWindow(sashForm); sashForm.setWeights(new int[] {8, 2}); - computeScrollSize(); - + setMinSize(0, 0); + // TODO: Change to use OteHelpContext HelpUtil.setHelp(this, "test_manager_scripts_page", "org.eclipse.osee.framework.help.ui"); } diff --git a/plugins/org.eclipse.osee.ote.ui.test.manager/src/org/eclipse/osee/ote/ui/test/manager/pages/TestManagerPage.java b/plugins/org.eclipse.osee.ote.ui.test.manager/src/org/eclipse/osee/ote/ui/test/manager/pages/TestManagerPage.java index 9b04480fa29..d35c44adc7b 100644 --- a/plugins/org.eclipse.osee.ote.ui.test.manager/src/org/eclipse/osee/ote/ui/test/manager/pages/TestManagerPage.java +++ b/plugins/org.eclipse.osee.ote.ui.test.manager/src/org/eclipse/osee/ote/ui/test/manager/pages/TestManagerPage.java @@ -42,6 +42,10 @@ public abstract class TestManagerPage extends ScrolledComposite { this.setContent(mainComposite); this.setExpandHorizontal(true); this.setExpandVertical(true); + getVerticalBar().setIncrement(25); + getVerticalBar().setPageIncrement(200); + getHorizontalBar().setIncrement(25); + getHorizontalBar().setPageIncrement(200); } public void computeScrollSize() { diff --git a/plugins/org.eclipse.osee.ote.ui.test.manager/src/org/eclipse/osee/ote/ui/test/manager/pages/scriptTable/ScriptTableViewer.java b/plugins/org.eclipse.osee.ote.ui.test.manager/src/org/eclipse/osee/ote/ui/test/manager/pages/scriptTable/ScriptTableViewer.java index 3213718201d..6182f377adb 100644 --- a/plugins/org.eclipse.osee.ote.ui.test.manager/src/org/eclipse/osee/ote/ui/test/manager/pages/scriptTable/ScriptTableViewer.java +++ b/plugins/org.eclipse.osee.ote.ui.test.manager/src/org/eclipse/osee/ote/ui/test/manager/pages/scriptTable/ScriptTableViewer.java @@ -15,6 +15,7 @@ import java.util.Iterator; import java.util.List; import java.util.Vector; import java.util.logging.Level; + import org.eclipse.jface.action.Action; import org.eclipse.jface.action.IMenuListener; import org.eclipse.jface.action.IMenuManager; @@ -481,8 +482,7 @@ public class ScriptTableViewer { @Override public void keyReleased(KeyEvent e) { - // If they press enter, do the same as a double click - if (e.character == SWT.DEL) { + if (e.character == SWT.DEL && (e.stateMask & SWT.CTRL) == 0) { removeSelectedTasks(); refresh(); } diff --git a/plugins/org.eclipse.osee.ote.ui.test.manager/src/org/eclipse/osee/ote/ui/test/manager/preferences/environment/EnvironmentPreferencePage.java b/plugins/org.eclipse.osee.ote.ui.test.manager/src/org/eclipse/osee/ote/ui/test/manager/preferences/environment/EnvironmentPreferencePage.java index 9b573f31359..ecc14cfaa90 100644 --- a/plugins/org.eclipse.osee.ote.ui.test.manager/src/org/eclipse/osee/ote/ui/test/manager/preferences/environment/EnvironmentPreferencePage.java +++ b/plugins/org.eclipse.osee.ote.ui.test.manager/src/org/eclipse/osee/ote/ui/test/manager/preferences/environment/EnvironmentPreferencePage.java @@ -13,6 +13,7 @@ package org.eclipse.osee.ote.ui.test.manager.preferences.environment; import java.util.ArrayList; import java.util.HashMap; import java.util.Map; + import org.eclipse.jface.preference.IPreferenceStore; import org.eclipse.jface.viewers.CheckStateChangedEvent; import org.eclipse.jface.viewers.CheckboxTreeViewer; @@ -139,7 +140,7 @@ public class EnvironmentPreferencePage { @Override public void keyReleased(KeyEvent e) { - if (e.character == SWT.DEL) { + if (e.character == SWT.DEL && (e.stateMask & SWT.CTRL) == 0) { environmentPageEventHandler.handleRemoveSelectedViewEvent(); } } |