Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 96373 Details for
Bug 129228
Test editors: links to test elements don't do highlighting anymore
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
Patch.
Defect_129228_patch.txt (text/plain), 12.51 KB, created by
Paul Slauenwhite
on 2008-04-16 22:23:02 EDT
(
hide
)
Description:
Patch.
Filename:
MIME Type:
Creator:
Paul Slauenwhite
Created:
2008-04-16 22:23:02 EDT
Size:
12.51 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.hyades.test.tools.ui >Index: src/org/eclipse/hyades/test/tools/ui/common/internal/editor/TestCasesForm.java >=================================================================== >RCS file: /cvsroot/tptp/test/org.eclipse.hyades.test.tools.ui/src/org/eclipse/hyades/test/tools/ui/common/internal/editor/TestCasesForm.java,v >retrieving revision 1.19 >diff -u -r1.19 TestCasesForm.java >--- src/org/eclipse/hyades/test/tools/ui/common/internal/editor/TestCasesForm.java 26 Apr 2007 20:23:32 -0000 1.19 >+++ src/org/eclipse/hyades/test/tools/ui/common/internal/editor/TestCasesForm.java 17 Apr 2008 02:20:56 -0000 >@@ -1,5 +1,5 @@ > /******************************************************************************* >- * Copyright (c) 2005, 2007 IBM Corporation and others. >+ * Copyright (c) 2005, 2008 IBM Corporation and others. > * 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 >@@ -39,11 +39,13 @@ > import org.eclipse.jface.viewers.ISelectionChangedListener; > import org.eclipse.jface.viewers.IStructuredSelection; > import org.eclipse.jface.viewers.SelectionChangedEvent; >+import org.eclipse.jface.viewers.StructuredSelection; > import org.eclipse.swt.custom.StyledText; > import org.eclipse.swt.layout.GridData; > import org.eclipse.swt.layout.GridLayout; > import org.eclipse.swt.widgets.Composite; > import org.eclipse.swt.widgets.Control; >+import org.eclipse.swt.widgets.Tree; > > /** > * Form for the <code>Test Cases</code> tab. >@@ -52,9 +54,8 @@ > * > * @author Marcelo Paternostro > * @author Paul E. Slauenwhite >- * @version March 14, 2007 >+ * @version April 16, 2008 > * @since February 1, 2005 >- * @since 1.0.2 > */ > public class TestCasesForm > extends EditorForm implements ISelectionChangedListener, IITestSuiteProvider >@@ -259,8 +260,15 @@ > public void load() > { > testCasesSection.getTreeViewer().removeSelectionChangedListener(this); >- testCasesSection.setInput(getTestSuite()); >+ testCasesSection.setInput(getTestSuite()); > testCasesSection.getTreeViewer().addSelectionChangedListener(this); >+ >+ //By default, select the first item in the tree: >+ Tree tree = testCasesSection.getTreeViewer().getTree(); >+ >+ if(tree.getItemCount() > 0){ >+ selectReveal(new StructuredSelection(tree.getItem(0).getData())); >+ } > } > > /** >Index: src/org/eclipse/hyades/test/tools/ui/common/internal/editor/TestSuiteEditorExtension.java >=================================================================== >RCS file: /cvsroot/tptp/test/org.eclipse.hyades.test.tools.ui/src/org/eclipse/hyades/test/tools/ui/common/internal/editor/TestSuiteEditorExtension.java,v >retrieving revision 1.8 >diff -u -r1.8 TestSuiteEditorExtension.java >--- src/org/eclipse/hyades/test/tools/ui/common/internal/editor/TestSuiteEditorExtension.java 22 Mar 2007 14:42:44 -0000 1.8 >+++ src/org/eclipse/hyades/test/tools/ui/common/internal/editor/TestSuiteEditorExtension.java 17 Apr 2008 02:20:56 -0000 >@@ -1,5 +1,5 @@ > /******************************************************************************* >- * Copyright (c) 2005, 2007 IBM Corporation and others. >+ * Copyright (c) 2005, 2008 IBM Corporation and others. > * 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 >@@ -11,16 +11,25 @@ > *******************************************************************************/ > package org.eclipse.hyades.test.tools.ui.common.internal.editor; > >+import org.eclipse.hyades.models.common.facades.behavioral.IAction; >+import org.eclipse.hyades.models.common.facades.behavioral.IBlock; >+import org.eclipse.hyades.models.common.facades.behavioral.IImplementor; >+import org.eclipse.hyades.models.common.facades.behavioral.ITestCase; > import org.eclipse.hyades.models.common.facades.behavioral.ITestSuite; > import org.eclipse.hyades.test.tools.ui.common.internal.util.IITestSuiteProvider; > import org.eclipse.hyades.test.ui.editor.extension.BaseEditorExtension; > import org.eclipse.jface.viewers.IStructuredSelection; > import org.eclipse.jface.viewers.StructuredSelection; > >- > /** >- * @author marcelop >- * @since 1.0.2 >+ * TestSuiteEditorExtension.java >+ * <p/> >+ * >+ * >+ * @author Marcelo Paternostro >+ * @author Paul E. Slauenwhite >+ * @version April 16, 2008 >+ * @since February 1, 2005 > */ > abstract public class TestSuiteEditorExtension > extends BaseEditorExtension implements IITestSuiteProvider >@@ -139,4 +148,33 @@ > > return false; > } >+ >+ /* (non-Javadoc) >+ * @see org.eclipse.hyades.ui.editor.EditorExtension#setSelection(org.eclipse.jface.viewers.IStructuredSelection) >+ */ >+ public void setSelection(IStructuredSelection structuredSelection) >+ { >+ >+ Object object = structuredSelection.getFirstElement(); >+ >+ if((object != null) && (object != getTestSuite())){ >+ >+ if(object instanceof ITestCase){ >+ >+ if(PAGE_TEST_CASES < getHyadesEditorPart().getPageCount()){ >+ >+ getHyadesEditorPart().setActivePage(PAGE_TEST_CASES); >+ getTestCasesForm().selectReveal(structuredSelection); >+ } >+ } >+ else if((object instanceof IImplementor) || (object instanceof IBlock) || (object instanceof IAction)){ >+ >+ if(PAGE_BEHAVIOR < getHyadesEditorPart().getPageCount()){ >+ >+ getHyadesEditorPart().setActivePage(PAGE_BEHAVIOR); >+ getBehaviorForm().selectReveal(structuredSelection); >+ } >+ } >+ } >+ } > } >\ No newline at end of file >#P org.eclipse.hyades.test.ui >Index: src/org/eclipse/hyades/test/ui/internal/editor/extension/ArtifactEditorExtension.java >=================================================================== >RCS file: /cvsroot/tptp/test/org.eclipse.hyades.test.ui/src/org/eclipse/hyades/test/ui/internal/editor/extension/ArtifactEditorExtension.java,v >retrieving revision 1.8 >diff -u -r1.8 ArtifactEditorExtension.java >--- src/org/eclipse/hyades/test/ui/internal/editor/extension/ArtifactEditorExtension.java 22 Mar 2007 14:42:10 -0000 1.8 >+++ src/org/eclipse/hyades/test/ui/internal/editor/extension/ArtifactEditorExtension.java 17 Apr 2008 02:20:57 -0000 >@@ -1,5 +1,5 @@ > /********************************************************************** >- * Copyright (c) 2005, 2007 IBM Corporation and others. >+ * Copyright (c) 2005, 2008 IBM Corporation and others. > * 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 >@@ -15,6 +15,7 @@ > > import org.eclipse.core.runtime.IConfigurationElement; > import org.eclipse.hyades.models.common.configuration.CFGArtifact; >+import org.eclipse.hyades.models.common.facades.behavioral.ITestSuite; > import org.eclipse.hyades.test.ui.editor.form.util.WidgetFactory; > import org.eclipse.hyades.test.ui.internal.editor.form.ArtifactForm; > import org.eclipse.hyades.test.ui.internal.editor.form.ConfigurableObjectOverviewForm; >@@ -22,13 +23,16 @@ > import org.eclipse.hyades.test.ui.internal.resources.UiPluginResourceBundle; > import org.eclipse.jface.viewers.IStructuredSelection; > >- > /** > * Hyades configurable object editor extension that is suitable for all > * {@link org.eclipse.hyades.models.common.configuration.CFGArtifact} objects. >+ * <p/> >+ * > * >- * @author bjiang >- * @since 3.0 >+ * @author Bianca Xue Jiang >+ * @author Paul E. Slauenwhite >+ * @version April 16, 2008 >+ * @since February 1, 2005 > */ > public class ArtifactEditorExtension extends ConfigurableObjectEditorExtension > { >@@ -38,19 +42,6 @@ > private static final int PAGE_TEST_ASSETS = 1; > private TestAssetsForm testAssetsForm; > >- /** >- * @see org.eclipse.hyades.ui.util.IDisposable#dispose() >- */ >- public void dispose() >- { >- if(testAssetsForm != null) >- { >- testAssetsForm.dispose(); >- testAssetsForm = null; >- } >- super.dispose(); >- } >- > protected IConfigurationElement[] collectPropertyGroupExtensions() > { > IConfigurationElement[] extensions = super.collectPropertyGroupExtensions(); >@@ -75,6 +66,19 @@ > } > return registeredExtensions; > } >+ >+ /** >+ * @see org.eclipse.hyades.ui.util.IDisposable#dispose() >+ */ >+ public void dispose() >+ { >+ if(testAssetsForm != null) >+ { >+ testAssetsForm.dispose(); >+ testAssetsForm = null; >+ } >+ super.dispose(); >+ } > > /** > * @see org.eclipse.hyades.ui.editor.IEditorExtension#createPages() >@@ -136,4 +140,22 @@ > else > return super.getSelection(); > } >+ >+ /* (non-Javadoc) >+ * @see org.eclipse.hyades.ui.editor.EditorExtension#setSelection(org.eclipse.jface.viewers.IStructuredSelection) >+ */ >+ public void setSelection(IStructuredSelection structuredSelection){ >+ >+ if(structuredSelection.getFirstElement() instanceof ITestSuite){ >+ >+ if(PAGE_TEST_ASSETS < getHyadesEditorPart().getPageCount()){ >+ >+ getHyadesEditorPart().setActivePage(PAGE_TEST_ASSETS); >+ testAssetsForm.selectReveal(structuredSelection); >+ } >+ } >+ else{ >+ super.setSelection(structuredSelection); >+ } >+ } > } >Index: src/org/eclipse/hyades/test/ui/internal/editor/extension/ConfigurableObjectEditorExtension.java >=================================================================== >RCS file: /cvsroot/tptp/test/org.eclipse.hyades.test.ui/src/org/eclipse/hyades/test/ui/internal/editor/extension/ConfigurableObjectEditorExtension.java,v >retrieving revision 1.12 >diff -u -r1.12 ConfigurableObjectEditorExtension.java >--- src/org/eclipse/hyades/test/ui/internal/editor/extension/ConfigurableObjectEditorExtension.java 3 May 2007 01:43:29 -0000 1.12 >+++ src/org/eclipse/hyades/test/ui/internal/editor/extension/ConfigurableObjectEditorExtension.java 17 Apr 2008 02:20:57 -0000 >@@ -1,5 +1,5 @@ > /******************************************************************************* >- * Copyright (c) 2005, 2007 IBM Corporation and others. >+ * Copyright (c) 2005, 2008 IBM Corporation and others. > * 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 >@@ -20,6 +20,7 @@ > import org.eclipse.core.runtime.Platform; > import org.eclipse.emf.common.util.EList; > import org.eclipse.emf.ecore.EObject; >+import org.eclipse.hyades.models.common.configuration.CFGComparableProperty; > import org.eclipse.hyades.models.common.configuration.CFGConfigurableObject; > import org.eclipse.hyades.models.common.configuration.CFGPropertyGroup; > import org.eclipse.hyades.models.common.configuration.Common_ConfigurationFactory; >@@ -36,9 +37,13 @@ > > /** > * This is the base class for Hyades configuration editor extension. >+ * <p/> > * >- * @author bjiang >- * @since 1.3 >+ * >+ * @author Bianca Xue Jiang >+ * @author Paul E. Slauenwhite >+ * @version April 16, 2008 >+ * @since February 1, 2005 > */ > public class ConfigurableObjectEditorExtension extends BaseEditorExtension implements IExtensibleEditorExtension > { >@@ -224,6 +229,42 @@ > return StructuredSelection.EMPTY; > } > >+ /* (non-Javadoc) >+ * @see org.eclipse.hyades.ui.editor.EditorExtension#setSelection(org.eclipse.jface.viewers.IStructuredSelection) >+ */ >+ public void setSelection(IStructuredSelection structuredSelection){ >+ >+ Object object = structuredSelection.getFirstElement(); >+ >+ if(object instanceof CFGComparableProperty){ >+ >+ EObject selectionPropertyEContainer = ((CFGComparableProperty)(object)).eContainer(); >+ >+ if(selectionPropertyEContainer instanceof CFGPropertyGroup){ >+ >+ String selectionPropertyGroupId = ((CFGPropertyGroup)(selectionPropertyEContainer)).getPropertyGroupID(); >+ Iterator pageIndexes = extensionPagesMap.keySet().iterator(); >+ >+ while(pageIndexes.hasNext()){ >+ >+ int pageIndex = ((Integer)(pageIndexes.next())).intValue(); >+ IPropertyGroupForm propertyGroupForm = ((IPropertyGroupForm)(extensionPagesMap.get(new Integer(pageIndex)))); >+ >+ if(propertyGroupForm.getPropertyGroup().getPropertyGroupID().equals(selectionPropertyGroupId)){ >+ >+ if(pageIndex < getHyadesEditorPart().getPageCount()){ >+ >+ getHyadesEditorPart().setActivePage(pageIndex); >+ propertyGroupForm.selectReveal(structuredSelection); >+ } >+ >+ break; >+ } >+ } >+ } >+ } >+ } >+ > /** > * @see org.eclipse.hyades.ui.editor.IEditorExtension#pageActivated(int) > */
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 129228
: 96373