summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorshawn.f.cook2011-10-26 18:16:35 (EDT)
committer Roberto E. Escobar2011-10-26 18:16:35 (EDT)
commit0852b12395307ff4c8ac231e55b5421e46d07563 (patch)
tree0c4f0536b82b39cb815b363e6ac44eee89412891
parentacf6e338be8f4a7f2db389af9bbd1ed98220a973 (diff)
downloadorg.eclipse.osee-0852b12395307ff4c8ac231e55b5421e46d07563.zip
org.eclipse.osee-0852b12395307ff4c8ac231e55b5421e46d07563.tar.gz
org.eclipse.osee-0852b12395307ff4c8ac231e55b5421e46d07563.tar.bz2
feature[ats_E6W8N]: Implement search progress listener
-rw-r--r--plugins/org.eclipse.osee.ats.presenter.mock/src/org/eclipse/osee/ats/presenter/mock/internal/MockAtsWebSearchPresenter.java48
-rw-r--r--plugins/org.eclipse.osee.ats.view.web/src/org/eclipse/osee/ats/view/web/AtsNavigator.java12
-rw-r--r--plugins/org.eclipse.osee.ats.view.web/src/org/eclipse/osee/ats/view/web/components/AtsSearchHeaderImpl.java140
-rw-r--r--plugins/org.eclipse.osee.display.view.web/src/org/eclipse/osee/display/view/web/AbstractCommonView.java2
-rw-r--r--plugins/org.eclipse.osee.display.view.web/src/org/eclipse/osee/display/view/web/CssConstants.java4
-rw-r--r--plugins/org.eclipse.osee.display.view.web/src/org/eclipse/osee/display/view/web/components/ComponentUtility.java14
-rw-r--r--plugins/org.eclipse.osee.display.view.web/src/org/eclipse/osee/display/view/web/components/OseeAttributeComponent.java21
-rw-r--r--plugins/org.eclipse.osee.display.view.web/src/org/eclipse/osee/display/view/web/components/OseeDisplayOptionsComponentImpl.java30
-rw-r--r--plugins/org.eclipse.osee.display.view.web/src/org/eclipse/osee/display/view/web/components/OseeLock.java47
-rw-r--r--plugins/org.eclipse.osee.support.config/launchConfig/UI.launch2
-rw-r--r--plugins/org.eclipse.osee.vaadin.themes/src/VAADIN/themes/osee/styles.css24
11 files changed, 281 insertions, 63 deletions
diff --git a/plugins/org.eclipse.osee.ats.presenter.mock/src/org/eclipse/osee/ats/presenter/mock/internal/MockAtsWebSearchPresenter.java b/plugins/org.eclipse.osee.ats.presenter.mock/src/org/eclipse/osee/ats/presenter/mock/internal/MockAtsWebSearchPresenter.java
index 0bd8e93..6941ece 100644
--- a/plugins/org.eclipse.osee.ats.presenter.mock/src/org/eclipse/osee/ats/presenter/mock/internal/MockAtsWebSearchPresenter.java
+++ b/plugins/org.eclipse.osee.ats.presenter.mock/src/org/eclipse/osee/ats/presenter/mock/internal/MockAtsWebSearchPresenter.java
@@ -107,19 +107,30 @@ public class MockAtsWebSearchPresenter<T extends AtsSearchHeaderComponent, K ext
}
@Override
- public void selectDisplayOptions(String url, DisplayOptions options, SearchNavigator navigator) {
- if (navigator != null && options != null) {
- Map<String, String> parameters = new HashMap<String, String>();
+ public void selectDisplayOptions(final String url, final DisplayOptions options, final SearchNavigator navigator) {
+ fireSearchInProgressEvent();
- if (options.getVerboseResults() != null) {
- parameters.put(UrlParamNameConstants.PARAMNAME_SHOWVERBOSE, options.getVerboseResults() ? "true" : "false");
- }
+ Thread thread = new Thread(new Runnable() {
+ @Override
+ public void run() {
+
+ if (navigator != null && options != null) {
+ Map<String, String> parameters = new HashMap<String, String>();
+
+ if (options.getVerboseResults() != null) {
+ parameters.put(UrlParamNameConstants.PARAMNAME_SHOWVERBOSE,
+ options.getVerboseResults() ? "true" : "false");
+ }
- if (parameters.size() > 0) {
- String newurl = parameterMapToRequestString(parameters, url);
- navigator.navigateSearchResults(newurl);
+ if (parameters.size() > 0) {
+ String newurl = parameterMapToRequestString(parameters, url);
+ navigator.navigateSearchResults(newurl);
+ }
+ }
+ fireSearchCompletedEvent();
}
- }
+ }, "thread1");
+ thread.start();
}
@Override
@@ -131,7 +142,7 @@ public class MockAtsWebSearchPresenter<T extends AtsSearchHeaderComponent, K ext
public void selectSearch(final String url, final K params, final SearchNavigator navigator) {
fireSearchInProgressEvent();
- Runnable searchThread = new Runnable() {
+ Thread thread = new Thread(new Runnable() {
@Override
public void run() {
if (navigator != null && params != null) {
@@ -151,18 +162,19 @@ public class MockAtsWebSearchPresenter<T extends AtsSearchHeaderComponent, K ext
}
if (parameters.size() > 0) {
String newurl = parameterMapToRequestString(parameters, url);
- // navigator.navigateSearchResults(newurl);
- try {
- Thread.sleep(2500);
- } catch (InterruptedException ex) {
- }
+ // try {
+ // Thread.sleep(5000);
+ // } catch (InterruptedException ex) {
+ // //do nothing
+ // }
+ navigator.navigateSearchResults(newurl);
fireSearchCompletedEvent();
}
}
}
- };
+ }, "thread1");
- searchThread.run();
+ thread.start();
}
private void updateSearchDisplayOptions(String url, DisplayOptionsComponent optionsComp) {
diff --git a/plugins/org.eclipse.osee.ats.view.web/src/org/eclipse/osee/ats/view/web/AtsNavigator.java b/plugins/org.eclipse.osee.ats.view.web/src/org/eclipse/osee/ats/view/web/AtsNavigator.java
index 4f27fe4..9fdd716 100644
--- a/plugins/org.eclipse.osee.ats.view.web/src/org/eclipse/osee/ats/view/web/AtsNavigator.java
+++ b/plugins/org.eclipse.osee.ats.view.web/src/org/eclipse/osee/ats/view/web/AtsNavigator.java
@@ -23,14 +23,18 @@ public class AtsNavigator extends Navigator implements SearchNavigator {
@Override
public void navigateSearchResults(String url) {
- String classUri = getUri(AtsSearchResultsView.class);
- this.navigateTo(String.format("%s%s", classUri, url));
+ synchronized (getApplication()) {
+ String classUri = getUri(AtsSearchResultsView.class);
+ this.navigateTo(String.format("%s%s", classUri, url));
+ }
}
@Override
public void navigateArtifactPage(String url) {
- String classUri = getUri(AtsArtifactView.class);
- this.navigateTo(String.format("%s%s", classUri, url));
+ synchronized (getApplication()) {
+ String classUri = getUri(AtsArtifactView.class);
+ this.navigateTo(String.format("%s%s", classUri, url));
+ }
}
}
diff --git a/plugins/org.eclipse.osee.ats.view.web/src/org/eclipse/osee/ats/view/web/components/AtsSearchHeaderImpl.java b/plugins/org.eclipse.osee.ats.view.web/src/org/eclipse/osee/ats/view/web/components/AtsSearchHeaderImpl.java
index 0faff32..6b058e5 100644
--- a/plugins/org.eclipse.osee.ats.view.web/src/org/eclipse/osee/ats/view/web/components/AtsSearchHeaderImpl.java
+++ b/plugins/org.eclipse.osee.ats.view.web/src/org/eclipse/osee/ats/view/web/components/AtsSearchHeaderImpl.java
@@ -17,6 +17,8 @@ import org.eclipse.osee.ats.view.web.AtsNavigator;
import org.eclipse.osee.ats.view.web.AtsUiApplication;
import org.eclipse.osee.ats.view.web.search.AtsSearchResultsView;
import org.eclipse.osee.display.api.data.ViewId;
+import org.eclipse.osee.display.api.search.SearchProgressListener;
+import org.eclipse.osee.display.api.search.SearchProgressProvider;
import org.eclipse.osee.display.view.web.CssConstants;
import org.eclipse.osee.display.view.web.components.ComponentUtility;
import org.eclipse.osee.display.view.web.components.OseeExceptionDialogComponent;
@@ -36,27 +38,38 @@ import com.vaadin.ui.ComboBox;
import com.vaadin.ui.HorizontalLayout;
import com.vaadin.ui.Label;
import com.vaadin.ui.Panel;
+import com.vaadin.ui.ProgressIndicator;
import com.vaadin.ui.TextField;
import com.vaadin.ui.VerticalLayout;
+import com.vaadin.ui.Window.Notification;
/**
* @author Shawn F. Cook
*/
@SuppressWarnings("serial")
-public class AtsSearchHeaderImpl extends OseeSearchHeaderComponent implements AtsSearchHeaderComponent, Handler, HasViewTitle {
+public class AtsSearchHeaderImpl extends OseeSearchHeaderComponent implements AtsSearchHeaderComponent, Handler, HasViewTitle, SearchProgressListener {
+ private final String SEARCHBUTTON_SEARCH = "Search";
+ private final String SEARCHBUTTON_CANCEL = "Cancel";
private boolean isLayoutComplete = false;
private final ComboBox programCombo = new ComboBox("Program:");
private final ComboBox buildCombo = new ComboBox("Build:");
private final CheckBox nameOnlyCheckBox = new CheckBox("Name Only", true);
private final TextField searchTextField = new TextField();
- private final Button searchButton = new Button("Search");
+ private final Button searchButton = new Button(SEARCHBUTTON_SEARCH);
private boolean lockProgramCombo = false;
- Panel searchTextPanel = new Panel();
+ private final Panel searchTextPanel = new Panel();
+ private final ProgressIndicator progressIndicator = new ProgressIndicator();
+ private final Label workingLabel = new Label("Working");
+ private boolean isSearchInProgress = false;
@Override
public void attach() {
if (!isLayoutComplete) {
+ AtsSearchPresenter searchPresenter = getPresenter();
+ if (searchPresenter != null && searchPresenter instanceof SearchProgressProvider) {
+ ((SearchProgressProvider) searchPresenter).addListener(this);
+ }
createLayout();
}
isLayoutComplete = true;
@@ -111,19 +124,31 @@ public class AtsSearchHeaderImpl extends OseeSearchHeaderComponent implements At
protected void selectSearch() {
if (searchButton.isEnabled()) {
- if (ComponentUtility.isAccessible(programCombo, buildCombo, nameOnlyCheckBox, searchTextField)) {
- ViewId program = (ViewId) programCombo.getValue();
- ViewId build = (ViewId) buildCombo.getValue();
- boolean nameOnly = nameOnlyCheckBox.toString().equalsIgnoreCase("true");
- String searchPhrase = (String) searchTextField.getValue();
- AtsSearchParameters params = new AtsSearchParameters(searchPhrase, nameOnly, build, program);
- getPresenter().selectSearch(getRequestedDataId(), params, getNavigator());
- } else {
- System.out.println("AtsSearchHeaderComponent.selectSearch - WARNING: null value detected.");
+ if (searchButton.getCaption().equals(SEARCHBUTTON_SEARCH)) {
+ if (ComponentUtility.isAccessible(programCombo, buildCombo, nameOnlyCheckBox, searchTextField)) {
+ ViewId program = (ViewId) programCombo.getValue();
+ ViewId build = (ViewId) buildCombo.getValue();
+ boolean nameOnly = nameOnlyCheckBox.toString().equalsIgnoreCase("true");
+ String searchPhrase = (String) searchTextField.getValue();
+ AtsSearchParameters params = new AtsSearchParameters(searchPhrase, nameOnly, build, program);
+ getPresenter().selectSearch(getRequestedDataId(), params, getNavigator());
+ } else {
+ System.out.println("AtsSearchHeaderComponent.selectSearch - WARNING: null value detected.");
+ }
+ } else if (searchButton.getCaption().equals(SEARCHBUTTON_CANCEL)) {
+ getPresenter().selectCancel();
}
}
}
+ private void startPolling() {
+ progressIndicator.setVisible(true);
+ }
+
+ private void stopPolling() {
+ progressIndicator.setVisible(false);
+ }
+
public void createLayout() {
setWidth(100, UNITS_PERCENTAGE);
setStyleName(CssConstants.OSEE_SEARCH_HEADER_COMPONENT_SMALL);
@@ -173,6 +198,10 @@ public class AtsSearchHeaderImpl extends OseeSearchHeaderComponent implements At
searchTextPanel.setScrollable(false);
searchTextPanel.addActionHandler(this);
searchTextPanel.setContent(hLayout_SearchText);
+ progressIndicator.setPollingInterval(500);
+ progressIndicator.setStyleName("invisible");
+ workingLabel.setVisible(false);
+ stopPolling();
hLayout_SearchText.addComponent(searchTextField);
@@ -181,10 +210,12 @@ public class AtsSearchHeaderImpl extends OseeSearchHeaderComponent implements At
hLayout_ProgBuildName.addComponent(buildCombo);
hLayout_ProgBuildName.addComponent(hSpacer_BuildName);
hLayout_ProgBuildName.addComponent(nameOnlyCheckBox);
+ hLayout_ProgBuildName.addComponent(workingLabel);
hLayout_SearchTextBtn.addComponent(searchTextPanel);
hLayout_SearchTextBtn.addComponent(hSpacer_SearchTextBtn);
hLayout_SearchTextBtn.addComponent(searchButton);
+ hLayout_SearchTextBtn.addComponent(progressIndicator);
vLayout_SearchCrit.addComponent(hLayout_ProgBuildName);
vLayout_SearchCrit.addComponent(hLayout_SearchTextBtn);
@@ -201,6 +232,24 @@ public class AtsSearchHeaderImpl extends OseeSearchHeaderComponent implements At
// hLayout_SearchTextBtn.setComponentAlignment(searchTextField, Alignment.MIDDLE_LEFT);
hLayout_SearchTextBtn.setComponentAlignment(searchButton, Alignment.MIDDLE_RIGHT);
+
+ //DEBUGGING
+ // Thread thread = new Thread(new Runnable() {
+ // private int i = 0;
+ //
+ // @Override
+ // public void run() {
+ // while (true) {
+ // nameOnlyCheckBox.setCaption(String.format("%d", i++));
+ // try {
+ // Thread.sleep(100);
+ // } catch (InterruptedException ex) {
+ // break;
+ // }
+ // }
+ // }
+ // }, "thread_debugging");
+ // thread.start();
}
@Override
@@ -309,4 +358,71 @@ public class AtsSearchHeaderImpl extends OseeSearchHeaderComponent implements At
public String getViewTitle() {
return (String) this.searchTextField.getValue();
}
+
+ @Override
+ public void searchInProgress() {
+ programCombo.setEnabled(false);
+ buildCombo.setEnabled(false);
+ nameOnlyCheckBox.setEnabled(false);
+ searchTextField.setEnabled(false);
+ searchButton.setCaption(SEARCHBUTTON_CANCEL);
+ isSearchInProgress = true;
+ startPolling();
+
+ Thread thread = new Thread(new Runnable() {
+ private int i = 0;
+
+ @Override
+ public void run() {
+ workingLabel.setVisible(true);
+ while (isSearchInProgress) {
+ if (i == 0) {
+ workingLabel.setStyleName(CssConstants.OSEE_WORKING_LABEL_1);
+ workingLabel.setValue("Working.");
+ i++;
+ } else if (i == 1) {
+ workingLabel.setStyleName(CssConstants.OSEE_WORKING_LABEL_2);
+ workingLabel.setValue("Working..");
+ i++;
+ } else {
+ workingLabel.setStyleName(CssConstants.OSEE_WORKING_LABEL_3);
+ workingLabel.setValue("Working...");
+ i = 0;
+ }
+ try {
+ Thread.sleep(500);
+ } catch (InterruptedException ex) {
+ System.out.println("???");
+ break;
+ }
+ }
+ workingLabel.setVisible(false);
+ stopPolling();
+ }
+ }, "thread_working_label");
+ thread.start();
+ }
+
+ @Override
+ public void searchCancelled() {
+ programCombo.setEnabled(true);
+ buildCombo.setEnabled(true);
+ nameOnlyCheckBox.setEnabled(true);
+ searchTextField.setEnabled(true);
+ validateSearchAndEnableSearchButton();
+ searchButton.setCaption(SEARCHBUTTON_SEARCH);
+ getApplication().getMainWindow().showNotification("Search Cancelled", Notification.TYPE_TRAY_NOTIFICATION);
+ isSearchInProgress = false;
+ }
+
+ @Override
+ public void searchCompleted() {
+ programCombo.setEnabled(true);
+ buildCombo.setEnabled(true);
+ nameOnlyCheckBox.setEnabled(true);
+ searchTextField.setEnabled(true);
+ validateSearchAndEnableSearchButton();
+ searchButton.setCaption(SEARCHBUTTON_SEARCH);
+ isSearchInProgress = false;
+ }
}
diff --git a/plugins/org.eclipse.osee.display.view.web/src/org/eclipse/osee/display/view/web/AbstractCommonView.java b/plugins/org.eclipse.osee.display.view.web/src/org/eclipse/osee/display/view/web/AbstractCommonView.java
index 101384d..0195e1d 100644
--- a/plugins/org.eclipse.osee.display.view.web/src/org/eclipse/osee/display/view/web/AbstractCommonView.java
+++ b/plugins/org.eclipse.osee.display.view.web/src/org/eclipse/osee/display/view/web/AbstractCommonView.java
@@ -60,7 +60,9 @@ public abstract class AbstractCommonView extends VerticalLayout implements Navig
searchPresenter = ComponentUtility.getPresenter(this);
initialUrl = requestedDataId;
if (searchPresenter != null) {
+ ComponentUtility.lockForNavigateTo();
callInit(initialUrl);
+ ComponentUtility.unlockForNavigateTo();
}
}
diff --git a/plugins/org.eclipse.osee.display.view.web/src/org/eclipse/osee/display/view/web/CssConstants.java b/plugins/org.eclipse.osee.display.view.web/src/org/eclipse/osee/display/view/web/CssConstants.java
index 5caf217..dd47b14 100644
--- a/plugins/org.eclipse.osee.display.view.web/src/org/eclipse/osee/display/view/web/CssConstants.java
+++ b/plugins/org.eclipse.osee.display.view.web/src/org/eclipse/osee/display/view/web/CssConstants.java
@@ -61,4 +61,8 @@ public final class CssConstants {
public static final String OSEE_EXCEPTION_ERROR_TITLE_TEXT = "osee-exception-error-title-text";
public static final String OSEE_EXCEPTION_WARNING_TITLE_TEXT = "osee-exception-warning-title-text";
public static final String OSEE_EXCEPTION_LONGMSG = "osee-exception-longmsg";
+
+ public static final String OSEE_WORKING_LABEL_1 = "osee-working-label-1";
+ public static final String OSEE_WORKING_LABEL_2 = "osee-working-label-2";
+ public static final String OSEE_WORKING_LABEL_3 = "osee-working-label-3";
}
diff --git a/plugins/org.eclipse.osee.display.view.web/src/org/eclipse/osee/display/view/web/components/ComponentUtility.java b/plugins/org.eclipse.osee.display.view.web/src/org/eclipse/osee/display/view/web/components/ComponentUtility.java
index 05a5b12..6930e78 100644
--- a/plugins/org.eclipse.osee.display.view.web/src/org/eclipse/osee/display/view/web/components/ComponentUtility.java
+++ b/plugins/org.eclipse.osee.display.view.web/src/org/eclipse/osee/display/view/web/components/ComponentUtility.java
@@ -23,10 +23,24 @@ import com.vaadin.ui.Component;
*/
public final class ComponentUtility {
+ private static final OseeLock lockForNavigateTo = new OseeLock();
+
private ComponentUtility() {
// Utility Class
}
+ public static void lockForNavigateTo() {
+ lockForNavigateTo.lock();
+ }
+
+ public static boolean tryLockForNavigateTo() {
+ return lockForNavigateTo.tryLockGreedy();
+ }
+
+ public static void unlockForNavigateTo() {
+ lockForNavigateTo.unlock();
+ }
+
public static boolean isAccessible(Component... components) {
boolean result = true;
if (components == null) {
diff --git a/plugins/org.eclipse.osee.display.view.web/src/org/eclipse/osee/display/view/web/components/OseeAttributeComponent.java b/plugins/org.eclipse.osee.display.view.web/src/org/eclipse/osee/display/view/web/components/OseeAttributeComponent.java
index a98e402..5422dd0 100644
--- a/plugins/org.eclipse.osee.display.view.web/src/org/eclipse/osee/display/view/web/components/OseeAttributeComponent.java
+++ b/plugins/org.eclipse.osee.display.view.web/src/org/eclipse/osee/display/view/web/components/OseeAttributeComponent.java
@@ -80,16 +80,7 @@ public class OseeAttributeComponent extends VerticalLayout implements AttributeC
public void addAttribute(String type, String value) {
if (type != null && !type.isEmpty() && value != null && !value.isEmpty()) {
- if (!type.equalsIgnoreCase("Word Template Content")) {
- Label attrLabel = new Label(String.format("%s:", type));
- attrLabel.setStyleName(CssConstants.OSEE_ATTRIBUTELABEL);
-
- Label attrValue = new Label(value);
- attrValue.setStyleName(CssConstants.OSEE_ATTRIBUTEVALUE);
-
- attrLabelsLayout.addComponent(attrLabel);
- attrValuesLayout.addComponent(attrValue);
- } else {
+ if (type.contains("Word") && type.contains("Content") && type.contains("Template")) {
Label attrLabel = new Label(String.format("%s:", type));
attrLabel.setStyleName(CssConstants.OSEE_ATTRIBUTELABEL_LONG);
@@ -106,8 +97,16 @@ public class OseeAttributeComponent extends VerticalLayout implements AttributeC
longAttrValuesLayout.addComponent(vSpacer_bottomAttr);
longAttrValuesLayout.setComponentAlignment(attrLabel, Alignment.BOTTOM_LEFT);
+ } else {
+ Label attrLabel = new Label(String.format("%s:", type));
+ attrLabel.setStyleName(CssConstants.OSEE_ATTRIBUTELABEL);
+
+ Label attrValue = new Label(value);
+ attrValue.setStyleName(CssConstants.OSEE_ATTRIBUTEVALUE);
+
+ attrLabelsLayout.addComponent(attrLabel);
+ attrValuesLayout.addComponent(attrValue);
}
}
}
-
}
diff --git a/plugins/org.eclipse.osee.display.view.web/src/org/eclipse/osee/display/view/web/components/OseeDisplayOptionsComponentImpl.java b/plugins/org.eclipse.osee.display.view.web/src/org/eclipse/osee/display/view/web/components/OseeDisplayOptionsComponentImpl.java
index ad336da..e05ff77 100644
--- a/plugins/org.eclipse.osee.display.view.web/src/org/eclipse/osee/display/view/web/components/OseeDisplayOptionsComponentImpl.java
+++ b/plugins/org.eclipse.osee.display.view.web/src/org/eclipse/osee/display/view/web/components/OseeDisplayOptionsComponentImpl.java
@@ -27,7 +27,6 @@ public class OseeDisplayOptionsComponentImpl extends VerticalLayout implements D
private final CheckBox showVerboseCheckBox = new CheckBox("Show Detailed Results", false);
private boolean isLayoutComplete = false;
- private boolean lockWhilePresenterUpdatesOptions = false;
@Override
public void attach() {
@@ -44,12 +43,8 @@ public class OseeDisplayOptionsComponentImpl extends VerticalLayout implements D
showVerboseCheckBox.addListener(new Property.ValueChangeListener() {
@Override
public void valueChange(ValueChangeEvent event) {
- if (!lockWhilePresenterUpdatesOptions) {
- lockWhilePresenterUpdatesOptions = true;
- boolean showVerbose = showVerboseCheckBox.toString().equalsIgnoreCase("true");
- onBoxChecked(showVerbose);
- lockWhilePresenterUpdatesOptions = false;
- }
+ boolean showVerbose = showVerboseCheckBox.toString().equalsIgnoreCase("true");
+ onBoxChecked(showVerbose);
}
});
@@ -64,23 +59,24 @@ public class OseeDisplayOptionsComponentImpl extends VerticalLayout implements D
@Override
public void setDisplayOptions(DisplayOptions options) {
if (options != null) {
- lockWhilePresenterUpdatesOptions = true;
boolean verboseResults = options.getVerboseResults();
showVerboseCheckBox.setValue(verboseResults);
- lockWhilePresenterUpdatesOptions = false;
}
}
private void onBoxChecked(boolean isShowVerbose) {
- DisplayOptions options = new DisplayOptions(isShowVerbose);
+ if (ComponentUtility.tryLockForNavigateTo()) {
+ DisplayOptions options = new DisplayOptions(isShowVerbose);
- String url = ComponentUtility.getUrl(OseeDisplayOptionsComponentImpl.this);
- SearchNavigator navigator = ComponentUtility.getNavigator(OseeDisplayOptionsComponentImpl.this);
- SearchPresenter<?, ?> presenter = ComponentUtility.getPresenter(OseeDisplayOptionsComponentImpl.this);
- if (presenter != null) {
- presenter.selectDisplayOptions(url, options, navigator);
- } else {
- System.out.println("Presenter was null");
+ String url = ComponentUtility.getUrl(OseeDisplayOptionsComponentImpl.this);
+ SearchNavigator navigator = ComponentUtility.getNavigator(OseeDisplayOptionsComponentImpl.this);
+ SearchPresenter<?, ?> presenter = ComponentUtility.getPresenter(OseeDisplayOptionsComponentImpl.this);
+ if (presenter != null) {
+ presenter.selectDisplayOptions(url, options, navigator);
+ } else {
+ System.out.println("Presenter was null");
+ }
+ ComponentUtility.unlockForNavigateTo();
}
}
}
diff --git a/plugins/org.eclipse.osee.display.view.web/src/org/eclipse/osee/display/view/web/components/OseeLock.java b/plugins/org.eclipse.osee.display.view.web/src/org/eclipse/osee/display/view/web/components/OseeLock.java
new file mode 100644
index 0000000..e78722e
--- /dev/null
+++ b/plugins/org.eclipse.osee.display.view.web/src/org/eclipse/osee/display/view/web/components/OseeLock.java
@@ -0,0 +1,47 @@
+/*******************************************************************************
+ * Copyright (c) 2011 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.display.view.web.components;
+
+/**
+ * @author Shawn F. cook
+ */
+public class OseeLock {
+
+ private boolean isLocked = false;
+
+ public synchronized void lock() {
+ while (isLocked) {
+ try {
+ wait();
+ } catch (InterruptedException ex) {
+ //TODO: need logger
+ System.out.println("OseeLock.lock - InterruptedException");
+ }
+ }
+ isLocked = true;
+ }
+
+ public synchronized void unlock() {
+ isLocked = false;
+ }
+
+ //If lock is AVAILABLE then LOCK it and return TRUE.
+ // If lock is NOT AVAILABLE then do nothing and return FALSE.
+ public synchronized boolean tryLockGreedy() {
+ if (!isLocked) {
+ lock();
+ return true;
+ } else {
+ return false;
+ }
+ }
+
+}
diff --git a/plugins/org.eclipse.osee.support.config/launchConfig/UI.launch b/plugins/org.eclipse.osee.support.config/launchConfig/UI.launch
index be2fb60..77f3dab 100644
--- a/plugins/org.eclipse.osee.support.config/launchConfig/UI.launch
+++ b/plugins/org.eclipse.osee.support.config/launchConfig/UI.launch
@@ -20,7 +20,7 @@
<stringAttribute key="pde.version" value="3.3"/>
<booleanAttribute key="show_selected_only" value="false"/>
<stringAttribute key="target_bundles" value="ch.qos.logback.classic@default:default,ch.qos.logback.core@default:default,ch.qos.logback.slf4j@default:false,com.google.collect@default:default,com.ibm.icu@default:default,javax.servlet@default:default,javax.xml@default:default,org.apache.commons.codec@default:default,org.apache.commons.httpclient@default:default,org.apache.commons.lang@default:default,org.apache.commons.logging@default:default,org.apache.xerces@default:default,org.apache.xml.resolver@default:default,org.apache.xml.serializer@default:default,org.eclipse.ant.core@default:default,org.eclipse.core.commands@default:default,org.eclipse.core.contenttype@default:default,org.eclipse.core.databinding.observable@default:default,org.eclipse.core.databinding.property@default:default,org.eclipse.core.databinding@default:default,org.eclipse.core.expressions@default:default,org.eclipse.core.filesystem.win32.x86@default:false,org.eclipse.core.filesystem@default:default,org.eclipse.core.jobs@default:default,org.eclipse.core.net.win32.x86@default:false,org.eclipse.core.net@default:default,org.eclipse.core.resources.win32.x86@default:false,org.eclipse.core.resources@default:default,org.eclipse.core.runtime.compatibility.registry@default:false,org.eclipse.core.runtime@default:true,org.eclipse.core.variables@default:default,org.eclipse.equinox.app@default:default,org.eclipse.equinox.common@2:true,org.eclipse.equinox.ds@1:true,org.eclipse.equinox.event@default:default,org.eclipse.equinox.http.jetty@default:default,org.eclipse.equinox.http.servlet@default:default,org.eclipse.equinox.preferences@default:default,org.eclipse.equinox.registry@default:default,org.eclipse.equinox.security.win32.x86@default:false,org.eclipse.equinox.security@default:default,org.eclipse.equinox.servletbridge.extensionbundle@default:false,org.eclipse.equinox.transforms.hook@default:false,org.eclipse.equinox.util@default:default,org.eclipse.equinox.weaving.hook@default:false,org.eclipse.osgi.services@default:default,org.eclipse.osgi.util@default:default,org.eclipse.osgi@-1:true,org.hamcrest.core@default:default,org.junit*4.8.2.v4_8_2_v20110321-1705@default:default,org.mortbay.jetty.server@default:default,org.mortbay.jetty.util@default:default,org.objectweb.asm@default:default,org.slf4j.api@default:default,org.slf4j.jcl@default:default"/>
-<stringAttribute key="timestamp" value="1319667132403"/>
+<stringAttribute key="timestamp" value="1319671543474"/>
<booleanAttribute key="tracing" value="false"/>
<booleanAttribute key="useCustomFeatures" value="false"/>
<booleanAttribute key="useDefaultConfigArea" value="true"/>
diff --git a/plugins/org.eclipse.osee.vaadin.themes/src/VAADIN/themes/osee/styles.css b/plugins/org.eclipse.osee.vaadin.themes/src/VAADIN/themes/osee/styles.css
index ebdf073..dd007d1 100644
--- a/plugins/org.eclipse.osee.vaadin.themes/src/VAADIN/themes/osee/styles.css
+++ b/plugins/org.eclipse.osee.vaadin.themes/src/VAADIN/themes/osee/styles.css
@@ -237,3 +237,27 @@ div.v-window-header {
width: 0px;
height: 0px;
}
+
+.invisible {
+ visibility:hidden;
+ }
+
+.osee-working-label-1 {
+ background-color: #9cdd93;
+ font-size: 20px;
+ font-weight:bold;
+ }
+
+.osee-working-label-2 {
+ background-color: #78d16b;
+ font-size: 20px;
+ font-weight:bold;
+ }
+
+.osee-working-label-3 {
+ background-color: #46b037;
+ font-size: 20px;
+ font-weight:bold;
+ }
+
+ \ No newline at end of file