Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrelves2006-11-25 00:30:09 +0000
committerrelves2006-11-25 00:30:09 +0000
commitf16537e1ddfeeda1ce5af783fb240144b84b728e (patch)
tree9eeb3c00c576b52b66565dbe9dcaa17d94ec818c
parent3add3a01d375366363f27bc96482b65e3d5d6081 (diff)
downloadorg.eclipse.mylyn.tasks-R_1_0.tar.gz
org.eclipse.mylyn.tasks-R_1_0.tar.xz
org.eclipse.mylyn.tasks-R_1_0.zip
NEW - bug 165733: jira search page will fail to load if connection failsR_1_0
https://bugs.eclipse.org/bugs/show_bug.cgi?id=165733
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TaskSearchPage.java110
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TaskUiUtil.java48
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/EditRepositoryPropertiesAction.java32
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/AbstractRepositoryTaskEditor.java40
4 files changed, 158 insertions, 72 deletions
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TaskSearchPage.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TaskSearchPage.java
index edd6ae288..c5b5c0151 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TaskSearchPage.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TaskSearchPage.java
@@ -17,8 +17,11 @@ import java.util.List;
import org.eclipse.jface.dialogs.DialogPage;
import org.eclipse.jface.dialogs.IDialogSettings;
import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.jface.layout.GridDataFactory;
import org.eclipse.jface.wizard.WizardPage;
+import org.eclipse.mylar.context.core.MylarStatusHandler;
import org.eclipse.mylar.internal.tasks.ui.search.AbstractRepositoryQueryPage;
+import org.eclipse.mylar.tasks.core.AbstractRepositoryQuery;
import org.eclipse.mylar.tasks.core.TaskRepository;
import org.eclipse.mylar.tasks.core.TaskRepositoryManager;
import org.eclipse.mylar.tasks.ui.AbstractRepositoryConnectorUi;
@@ -34,6 +37,9 @@ import org.eclipse.swt.widgets.Combo;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Group;
+import org.eclipse.ui.forms.events.HyperlinkAdapter;
+import org.eclipse.ui.forms.events.HyperlinkEvent;
+import org.eclipse.ui.forms.widgets.Hyperlink;
/**
* @author Rob Elves
@@ -94,7 +100,7 @@ public class TaskSearchPage extends DialogPage implements ISearchPage {
gd.horizontalSpan = 1;
group.setLayoutData(gd);
- repositoryCombo = new Combo(group, SWT.SINGLE | SWT.BORDER | SWT.READ_ONLY);
+ repositoryCombo = new Combo(group, SWT.SINGLE | SWT.BORDER | SWT.READ_ONLY);
repositoryCombo.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) {
@@ -105,21 +111,56 @@ public class TaskSearchPage extends DialogPage implements ISearchPage {
repositoryCombo.setLayoutData(gd);
}
- private WizardPage createPage(TaskRepository repository) {
+ private WizardPage createPage(final TaskRepository repository) {
if (repository != null) {
- AbstractRepositoryConnectorUi connectorUi = TasksUiPlugin.getRepositoryUi(
- repository.getKind());
+ AbstractRepositoryConnectorUi connectorUi = TasksUiPlugin.getRepositoryUi(repository.getKind());
if (connectorUi != null) {
- WizardPage searchPage = connectorUi.getSearchPage(repository, null);
+ WizardPage searchPage = null;
+
+ searchPage = connectorUi.getSearchPage(repository, null);
+
if (searchPage != null) {
((ISearchPage) searchPage).setContainer(pageContainer);
- searchPage.createControl(fParentComposite);
- return searchPage;
- } else {
- // Search page not available
+ try {
+ searchPage.createControl(fParentComposite);
+ } catch (Exception e) {
+ searchPage.dispose();
+ searchPage = new DeadSearchPage(repository) {
+ @Override
+ public void createControl(Composite parent) {
+ Hyperlink hyperlink = new Hyperlink(parent, SWT.NONE);
+ hyperlink
+ .setText("ERROR: Unable to present query page, ensure repository configuration is valid and retry");
+ hyperlink.setUnderlined(true);
+ hyperlink.addHyperlinkListener(new HyperlinkAdapter() {
+ @Override
+ public void linkActivated(HyperlinkEvent e) {
+ TaskSearchPage.this.getControl().getShell().close();
+ TaskUiUtil.openEditRepositoryWizard(getRepository());
+ // TODO: Re-construct this page with new
+ // repository data
+ }
+
+ });
+
+ GridDataFactory.fillDefaults().applyTo(hyperlink);
+ setControl(hyperlink);
+ }
+ };
+ ((ISearchPage) searchPage).setContainer(pageContainer);
+ searchPage.createControl(fParentComposite);
+ MylarStatusHandler.log(e, "Error occurred while constructing search page for "
+ + repository.getUrl() + " [" + repository.getKind() + "]");
+ // searchPage.getControl().dispose();
+
+ }
}
+ return searchPage;
+ } else {
+ // Search page not available
}
}
+
return null;
}
@@ -144,13 +185,15 @@ public class TaskSearchPage extends DialogPage implements ISearchPage {
}
if (queryPages[pageIndex] != null) {
- GridData data = (GridData) queryPages[pageIndex].getControl().getLayoutData();
- if (data == null) {
- data = new GridData();
+ if (queryPages[pageIndex].getControl() != null) {
+ GridData data = (GridData) queryPages[pageIndex].getControl().getLayoutData();
+ if (data == null) {
+ data = new GridData();
+ }
+ data.exclude = false;
+ queryPages[pageIndex].getControl().setLayoutData(data);
+ queryPages[pageIndex].setVisible(true);
}
- data.exclude = false;
- queryPages[pageIndex].getControl().setLayoutData(data);
- queryPages[pageIndex].setVisible(true);
}
currentPageIndex = pageIndex;
@@ -163,8 +206,7 @@ public class TaskSearchPage extends DialogPage implements ISearchPage {
List<TaskRepository> repositories = TasksUiPlugin.getRepositoryManager().getAllRepositories();
List<TaskRepository> searchableRepositories = new ArrayList<TaskRepository>();
for (TaskRepository repository : repositories) {
- AbstractRepositoryConnectorUi connectorUi = TasksUiPlugin.getRepositoryUi(
- repository.getKind());
+ AbstractRepositoryConnectorUi connectorUi = TasksUiPlugin.getRepositoryUi(repository.getKind());
if (connectorUi != null && connectorUi.hasSearchPage()) {
searchableRepositories.add(repository);
}
@@ -200,20 +242,21 @@ public class TaskSearchPage extends DialogPage implements ISearchPage {
repositoryCombo.select(indexToSelect);
}
- // TODO: Create one page per connector and repopulate based on repository
+ // TODO: Create one page per connector and repopulate based
+ // on repository
queryPages = new AbstractRepositoryQueryPage[repositoryUrls.length];
displayQueryPage(repositoryCombo.getSelectionIndex());
// updateAttributesFromRepository(repositoryCombo.getText(),
// null, false);
}
}
- firstView = false;
+ firstView = false;
}
- if(queryPages == null) {
+ if (queryPages == null) {
pageContainer.setPerformActionEnabled(false);
}
-
+
super.setVisible(visible);
}
@@ -241,4 +284,29 @@ public class TaskSearchPage extends DialogPage implements ISearchPage {
}
super.dispose();
}
+
+ private static class DeadSearchPage extends AbstractRepositoryQueryPage {
+
+ private TaskRepository taskRepository;
+
+ public DeadSearchPage(TaskRepository rep) {
+ super("Seach page error");
+ this.taskRepository = rep;
+ }
+
+ @Override
+ public AbstractRepositoryQuery getQuery() {
+ return null;
+ }
+
+ @Override
+ public boolean isPageComplete() {
+ return false;
+ }
+
+ public TaskRepository getRepository() {
+ return taskRepository;
+ }
+
+ }
}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TaskUiUtil.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TaskUiUtil.java
index ced4f38b3..4bfab434a 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TaskUiUtil.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TaskUiUtil.java
@@ -19,12 +19,15 @@ import java.util.List;
import org.eclipse.core.runtime.jobs.IJobChangeEvent;
import org.eclipse.core.runtime.jobs.Job;
import org.eclipse.core.runtime.jobs.JobChangeAdapter;
+import org.eclipse.jface.dialogs.Dialog;
import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.jface.wizard.WizardDialog;
import org.eclipse.mylar.context.core.MylarStatusHandler;
import org.eclipse.mylar.internal.tasks.ui.editors.CategoryEditorInput;
import org.eclipse.mylar.internal.tasks.ui.editors.MylarTaskEditor;
import org.eclipse.mylar.internal.tasks.ui.editors.TaskEditorInput;
import org.eclipse.mylar.internal.tasks.ui.views.TaskRepositoriesView;
+import org.eclipse.mylar.internal.tasks.ui.wizards.EditRepositoryWizard;
import org.eclipse.mylar.tasks.core.AbstractQueryHit;
import org.eclipse.mylar.tasks.core.AbstractRepositoryConnector;
import org.eclipse.mylar.tasks.core.AbstractRepositoryQuery;
@@ -40,6 +43,7 @@ import org.eclipse.mylar.tasks.ui.AbstractRepositoryConnectorUi;
import org.eclipse.mylar.tasks.ui.TasksUiPlugin;
import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Shell;
import org.eclipse.ui.IEditorInput;
import org.eclipse.ui.IEditorPart;
import org.eclipse.ui.IEditorReference;
@@ -135,18 +139,18 @@ public class TaskUiUtil {
}
}
}
-
+
if (task != null) {
TaskUiUtil.refreshAndOpenTaskListElement(task);
opened = true;
} else {
- AbstractRepositoryConnector connector = TasksUiPlugin.getRepositoryManager().getConnectorForRepositoryTaskUrl(
- fullUrl);
+ AbstractRepositoryConnector connector = TasksUiPlugin.getRepositoryManager()
+ .getConnectorForRepositoryTaskUrl(fullUrl);
AbstractRepositoryConnectorUi connectorUi = TasksUiPlugin.getRepositoryUi(connector.getRepositoryType());
if (connector != null) {
opened = connectorUi.openRemoteTask(repositoryUrl, taskId);
- }
+ }
}
if (!opened) {
TaskUiUtil.openUrl(fullUrl);
@@ -164,7 +168,7 @@ public class TaskUiUtil {
task = ((AbstractQueryHit) element).getCorrespondingTask();
} else {
task = ((AbstractQueryHit) element).getOrCreateCorrespondingTask();
-// NewLocalTaskAction.scheduleNewTask(task);
+ // NewLocalTaskAction.scheduleNewTask(task);
}
} else if (element instanceof DateRangeActivityDelegate) {
task = ((DateRangeActivityDelegate) element).getCorrespondingTask();
@@ -181,7 +185,8 @@ public class TaskUiUtil {
TaskRepository repository = TasksUiPlugin.getRepositoryManager().getRepository(repositoryKind,
repositoryTask.getRepositoryUrl());
if (repository == null) {
- MylarStatusHandler.fail(null, "No repository found for task. Please create repository in "+TaskRepositoriesView.NAME+".", true);
+ MylarStatusHandler.fail(null, "No repository found for task. Please create repository in "
+ + TaskRepositoriesView.NAME + ".", true);
return;
}
@@ -194,9 +199,11 @@ public class TaskUiUtil {
Job refreshJob = TasksUiPlugin.getSynchronizationManager().synchronize(connector,
repositoryTask, true, new JobChangeAdapter() {
public void done(IJobChangeEvent event) {
- // Mark read here too so that hits get marked as read upon opening
- // TODO: if synch job failed, don't mark read
- TasksUiPlugin.getSynchronizationManager().setTaskRead(repositoryTask, true);
+ // Mark read here too so that hits get
+ // marked as read upon opening
+ // TODO: if synch job failed, don't mark
+ // read
+ TasksUiPlugin.getSynchronizationManager().setTaskRead(repositoryTask, true);
TaskUiUtil.openEditor(task, false);
}
});
@@ -292,6 +299,29 @@ public class TaskUiUtil {
}
}
+ public static int openEditRepositoryWizard(TaskRepository repository) {
+ try {
+ EditRepositoryWizard wizard = new EditRepositoryWizard(repository);
+ Shell shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell();
+ if (wizard != null && shell != null && !shell.isDisposed()) {
+ WizardDialog dialog = new WizardDialog(shell, wizard);
+ dialog.create();
+ dialog.setBlockOnOpen(true);
+ if (dialog.open() == Dialog.CANCEL) {
+ dialog.close();
+ return Dialog.CANCEL;
+ }
+ }
+
+ if (TaskRepositoriesView.getFromActivePerspective() != null) {
+ TaskRepositoriesView.getFromActivePerspective().getViewer().refresh();
+ }
+ } catch (Exception e) {
+ MylarStatusHandler.fail(e, e.getMessage(), true);
+ }
+ return Dialog.OK;
+ }
+
public static List<MylarTaskEditor> getActiveRepositoryTaskEditors() {
List<MylarTaskEditor> repositoryTaskEditors = new ArrayList<MylarTaskEditor>();
IWorkbenchWindow[] windows = PlatformUI.getWorkbench().getWorkbenchWindows();
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/EditRepositoryPropertiesAction.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/EditRepositoryPropertiesAction.java
index e26d0b458..04cd57c13 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/EditRepositoryPropertiesAction.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/EditRepositoryPropertiesAction.java
@@ -13,17 +13,12 @@ package org.eclipse.mylar.internal.tasks.ui.actions;
import org.eclipse.jface.action.Action;
import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.dialogs.Dialog;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.wizard.WizardDialog;
-import org.eclipse.mylar.context.core.MylarStatusHandler;
+import org.eclipse.mylar.internal.tasks.ui.TaskUiUtil;
import org.eclipse.mylar.internal.tasks.ui.views.TaskRepositoriesView;
-import org.eclipse.mylar.internal.tasks.ui.wizards.EditRepositoryWizard;
import org.eclipse.mylar.tasks.core.TaskRepository;
-import org.eclipse.swt.widgets.Shell;
import org.eclipse.ui.IViewPart;
-import org.eclipse.ui.PlatformUI;
/**
* @author Mik Kersten
@@ -45,28 +40,9 @@ public class EditRepositoryPropertiesAction extends Action {
}
public void run() {
- try {
- IStructuredSelection selection = (IStructuredSelection) repositoriesView.getViewer().getSelection();
- if (selection.getFirstElement() instanceof TaskRepository) {
- EditRepositoryWizard wizard = new EditRepositoryWizard((TaskRepository) selection.getFirstElement());
- Shell shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell();
- if (wizard != null && shell != null && !shell.isDisposed()) {
- WizardDialog dialog = new WizardDialog(shell, wizard);
- dialog.create();
- // dialog.getShell().setText("Mylar Tasks");
- dialog.setBlockOnOpen(true);
- if (dialog.open() == Dialog.CANCEL) {
- dialog.close();
- return;
- }
- }
- }
- // TODO: move
- if (TaskRepositoriesView.getFromActivePerspective() != null) {
- TaskRepositoriesView.getFromActivePerspective().getViewer().refresh();
- }
- } catch (Exception e) {
- MylarStatusHandler.fail(e, e.getMessage(), true);
+ IStructuredSelection selection = (IStructuredSelection) repositoriesView.getViewer().getSelection();
+ if (selection.getFirstElement() instanceof TaskRepository) {
+ TaskUiUtil.openEditRepositoryWizard((TaskRepository) selection.getFirstElement());
}
}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/AbstractRepositoryTaskEditor.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/AbstractRepositoryTaskEditor.java
index 7846289a3..02f056530 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/AbstractRepositoryTaskEditor.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/AbstractRepositoryTaskEditor.java
@@ -108,6 +108,7 @@ import org.eclipse.swt.widgets.TableColumn;
import org.eclipse.swt.widgets.Text;
import org.eclipse.ui.IEditorDescriptor;
import org.eclipse.ui.IEditorInput;
+import org.eclipse.ui.IEditorSite;
import org.eclipse.ui.ISelectionListener;
import org.eclipse.ui.IStorageEditorInput;
import org.eclipse.ui.IWorkbenchPage;
@@ -465,7 +466,7 @@ public abstract class AbstractRepositoryTaskEditor extends TaskFormPage {
protected abstract void submitToRepository();
private Color backgroundIncoming;
-
+
/**
* Creates a new <code>AbstractRepositoryTaskEditor</code>. Sets up the
* default fonts and cut/copy/paste actions.
@@ -479,12 +480,17 @@ public abstract class AbstractRepositoryTaskEditor extends TaskFormPage {
scrollIncrement = fd[0].getHeight() + cushion;
scrollVertPageIncrement = 0;
scrollHorzPageIncrement = 0;
- initColors();
}
public AbstractRepositoryTaskEditor(FormEditor editor, boolean htmlComments) {
this(editor);
this.htmlComments = htmlComments;
+
+ }
+
+ @Override
+ public void init(IEditorSite site, IEditorInput input) {
+ super.init(site, input);
initColors();
}
@@ -618,7 +624,7 @@ public abstract class AbstractRepositoryTaskEditor extends TaskFormPage {
protected Text createTextField(Composite composite, RepositoryTaskAttribute attribute, int style) {
Text text;
String value;
- if(attribute == null) {
+ if (attribute == null) {
value = "";
} else {
value = attribute.getValue();
@@ -681,11 +687,11 @@ public abstract class AbstractRepositoryTaskEditor extends TaskFormPage {
if (hasChanged(attribute)) {
attributeCombo.setBackground(backgroundIncoming);
}
- attributeCombo.setLayoutData(data);
+ attributeCombo.setLayoutData(data);
for (String val : values) {
attributeCombo.add(val);
}
-
+
if (attributeCombo.indexOf(value) != -1) {
attributeCombo.select(attributeCombo.indexOf(value));
}
@@ -709,7 +715,7 @@ public abstract class AbstractRepositoryTaskEditor extends TaskFormPage {
final Text text = createTextField(textFieldComposite, attribute, SWT.FLAT | SWT.READ_ONLY);
text.setLayoutData(textData);
} else {
- final Text text = createTextField(textFieldComposite, attribute, SWT.FLAT);
+ final Text text = createTextField(textFieldComposite, attribute, SWT.FLAT);
// text.setFont(COMMENT_FONT);
text.setLayoutData(textData);
toolkit.paintBordersFor(textFieldComposite);
@@ -798,7 +804,8 @@ public abstract class AbstractRepositoryTaskEditor extends TaskFormPage {
GridDataFactory.fillDefaults().grab(true, false).applyTo(summaryComposite);
toolkit.createLabel(summaryComposite, "Summary:").setFont(TITLE_FONT);
- summaryText = createTextField(summaryComposite, getRepositoryTaskData().getAttribute(RepositoryTaskAttribute.SUMMARY), SWT.FLAT);
+ summaryText = createTextField(summaryComposite, getRepositoryTaskData().getAttribute(
+ RepositoryTaskAttribute.SUMMARY), SWT.FLAT);
IThemeManager themeManager = getSite().getWorkbenchWindow().getWorkbench().getThemeManager();
Font summaryFont = themeManager.getCurrentTheme().getFontRegistry()
.get(TaskListColorsAndFonts.TASK_EDITOR_FONT);
@@ -1285,7 +1292,7 @@ public abstract class AbstractRepositoryTaskEditor extends TaskFormPage {
if (attribute != null && !attribute.isReadOnly()) {
descriptionTextViewer = addTextEditor(repository, sectionComposite, getRepositoryTaskData()
.getDescription(), true, SWT.FLAT | SWT.MULTI | SWT.WRAP | SWT.V_SCROLL);
- descriptionTextViewer.setEditable(true);
+ descriptionTextViewer.setEditable(true);
StyledText styledText = descriptionTextViewer.getTextWidget();
GridData gd = new GridData(GridData.FILL_HORIZONTAL);
gd.widthHint = DESCRIPTION_WIDTH;
@@ -1313,7 +1320,7 @@ public abstract class AbstractRepositoryTaskEditor extends TaskFormPage {
textHash.put(text, styledText);
}
-
+
if (hasChanged(getRepositoryTaskData().getAttribute(RepositoryTaskAttribute.DESCRIPTION))) {
descriptionTextViewer.getTextWidget().setBackground(backgroundIncoming);
}
@@ -1346,7 +1353,8 @@ public abstract class AbstractRepositoryTaskEditor extends TaskFormPage {
textLayout.marginHeight = 0;
textLayout.marginRight = 5;
textFieldComposite.setLayout(textLayout);
- createTextField(textFieldComposite, getRepositoryTaskData().getAttribute(RepositoryTaskAttribute.USER_ASSIGNED), SWT.FLAT | SWT.READ_ONLY);
+ createTextField(textFieldComposite,
+ getRepositoryTaskData().getAttribute(RepositoryTaskAttribute.USER_ASSIGNED), SWT.FLAT | SWT.READ_ONLY);
label = toolkit.createLabel(peopleComposite, "Reporter:");
GridDataFactory.fillDefaults().align(SWT.RIGHT, SWT.DEFAULT).applyTo(label);
@@ -1356,7 +1364,8 @@ public abstract class AbstractRepositoryTaskEditor extends TaskFormPage {
textLayout.verticalSpacing = 0;
textLayout.marginHeight = 0;
textFieldComposite.setLayout(textLayout);
- createTextField(textFieldComposite, getRepositoryTaskData().getAttribute(RepositoryTaskAttribute.USER_REPORTER), SWT.FLAT | SWT.READ_ONLY);
+ createTextField(textFieldComposite,
+ getRepositoryTaskData().getAttribute(RepositoryTaskAttribute.USER_REPORTER), SWT.FLAT | SWT.READ_ONLY);
addSelfToCC(peopleComposite);
@@ -2277,11 +2286,14 @@ public abstract class AbstractRepositoryTaskEditor extends TaskFormPage {
}
protected boolean hasChanged(RepositoryTaskAttribute newAttribute) {
- if(newAttribute == null) return false;
+ if (newAttribute == null)
+ return false;
RepositoryTaskData oldTaskData = editorInput.getOldTaskData();
- if(oldTaskData == null) return false;
+ if (oldTaskData == null)
+ return false;
RepositoryTaskAttribute oldAttribute = oldTaskData.getAttribute(newAttribute.getID());
- if(oldAttribute == null) return false;
+ if (oldAttribute == null)
+ return false;
if (!oldAttribute.getValue().equals(newAttribute.getValue())) {
return true;
} else if (!oldAttribute.getValues().equals(newAttribute.getValues())) {

Back to the top