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 42840 Details for
Bug 139314
Add support for custom JIRA query editing
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]
Fixed issue with editing Jira query and layout issues
mylar.jira.query.editor.patch (text/plain), 14.40 KB, created by
Eugene Kuleshov
on 2006-05-29 02:33:15 EDT
(
hide
)
Description:
Fixed issue with editing Jira query and layout issues
Filename:
MIME Type:
Creator:
Eugene Kuleshov
Created:
2006-05-29 02:33:15 EDT
Size:
14.40 KB
patch
obsolete
>Index: src/org/eclipse/mylar/internal/jira/ui/wizards/FilterSummaryPage.java >=================================================================== >RCS file: /home/technology/org.eclipse.mylar/org.eclipse.mylar.jira/src/org/eclipse/mylar/internal/jira/ui/wizards/FilterSummaryPage.java,v >retrieving revision 1.1 >diff -u -r1.1 FilterSummaryPage.java >--- src/org/eclipse/mylar/internal/jira/ui/wizards/FilterSummaryPage.java 28 Apr 2006 17:49:36 -0000 1.1 >+++ src/org/eclipse/mylar/internal/jira/ui/wizards/FilterSummaryPage.java 29 May 2006 06:34:33 -0000 >@@ -15,7 +15,6 @@ > import java.util.Iterator; > import java.util.List; > >-import org.eclipse.jface.resource.ImageDescriptor; > import org.eclipse.jface.viewers.IColorProvider; > import org.eclipse.jface.viewers.ILabelProvider; > import org.eclipse.jface.viewers.ILabelProviderListener; >@@ -35,6 +34,7 @@ > import org.eclipse.mylar.provisional.tasklist.MylarTaskListPlugin; > import org.eclipse.mylar.provisional.tasklist.TaskRepository; > import org.eclipse.swt.SWT; >+import org.eclipse.swt.custom.SashForm; > import org.eclipse.swt.events.FocusAdapter; > import org.eclipse.swt.events.FocusEvent; > import org.eclipse.swt.events.ModifyEvent; >@@ -119,9 +119,8 @@ > * @param title > * @param titleImage > */ >- protected FilterSummaryPage(TaskRepository repository, String pageName, String title, ImageDescriptor titleImage, >- FilterDefinition workingCopy, boolean isNew) { >- super(pageName, title, titleImage); >+ protected FilterSummaryPage(TaskRepository repository, FilterDefinition workingCopy, boolean isNew) { >+ super("summaryPage", "Filter Summary", null); > this.repository = repository; > > this.server = JiraServerFacade.getDefault().getJiraServer(repository); >@@ -132,9 +131,8 @@ > } > > public void createControl(Composite parent) { >- GridData gd; > Composite c = new Composite(parent, SWT.NONE); >- c.setLayout(new GridLayout(3, false)); >+ c.setLayout(new GridLayout(5, false)); > > Label lblName = new Label(c, SWT.NONE); > final GridData gridData = new GridData(); >@@ -142,7 +140,7 @@ > lblName.setText("Name:"); > > name = new Text(c, SWT.BORDER); >- name.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false, 2, 1)); >+ name.setLayoutData(new GridData(SWT.FILL, SWT.FILL, false, false, 4, 1)); > name.addModifyListener(new ModifyListener() { > > public void modifyText(ModifyEvent e) { >@@ -160,7 +158,7 @@ > lblDescription.setLayoutData(new GridData(SWT.LEFT, SWT.TOP, false, false)); > > description = new Text(c, SWT.BORDER | SWT.MULTI | SWT.WRAP | SWT.V_SCROLL); >- gd = new GridData(SWT.FILL, SWT.FILL, true, false, 2, 1); >+ GridData gd = new GridData(SWT.FILL, SWT.FILL, false, false, 4, 1); > gd.heightHint = 40; > description.setLayoutData(gd); > description.addFocusListener(new FocusAdapter() { >@@ -172,38 +170,62 @@ > }); > > { >- Composite cc = new Composite(c, SWT.NONE); >- final GridData gridData_1 = new GridData(SWT.FILL, SWT.FILL, false, true, 3, 1); >- cc.setLayoutData(gridData_1); >- cc.setLayout(new GridLayout(4, false)); >- >- Label lblProject = new Label(cc, SWT.NONE); >- lblProject.setText("Project:"); >- >- Label lblFixFor = new Label(cc, SWT.NONE); >- lblFixFor.setText("Fix For:"); >- lblFixFor.setLayoutData(new GridData(SWT.LEFT, SWT.TOP, false, false)); >- >- Label lblComponent = new Label(cc, SWT.NONE); >- lblComponent.setText("In Components:"); >- lblComponent.setLayoutData(new GridData(SWT.LEFT, SWT.TOP, false, false)); >- >- Label lblReportedIn = new Label(cc, SWT.NONE); >- lblReportedIn.setText("Reported In:"); >- lblReportedIn.setLayoutData(new GridData(SWT.LEFT, SWT.TOP, false, false)); >- >- createProjectsViewer(cc); >- createFixForViewer(cc); >- createComponentsViewer(cc); >- createReportedInViewer(cc); >+ SashForm cc = new SashForm(c, SWT.HORIZONTAL); >+ cc.setLayoutData(new GridData(SWT.FILL, SWT.FILL, false, true, 5, 1)); > >+ { >+ Composite comp = new Composite(cc, SWT.NONE); >+ GridLayout gridLayout = new GridLayout(1, false); >+ gridLayout.marginWidth = 0; >+ gridLayout.marginHeight = 0; >+ comp.setLayout(gridLayout); >+ >+ Label label = new Label(comp, SWT.NONE); >+ label.setText("Project:"); >+ createProjectsViewer(comp); >+ } >+ >+ { >+ Composite comp = new Composite(cc, SWT.NONE); >+ GridLayout gridLayout = new GridLayout(1, false); >+ gridLayout.marginWidth = 0; >+ gridLayout.marginHeight = 0; >+ comp.setLayout(gridLayout); >+ >+ new Label(comp, SWT.NONE).setText("Fix For:"); >+ createFixForViewer(comp); >+ } >+ >+ { >+ Composite comp = new Composite(cc, SWT.NONE); >+ GridLayout gridLayout = new GridLayout(1, false); >+ gridLayout.marginWidth = 0; >+ gridLayout.marginHeight = 0; >+ comp.setLayout(gridLayout); >+ >+ new Label(comp, SWT.NONE).setText("In Components:"); >+ createComponentsViewer(comp); >+ } >+ >+ { >+ Composite comp = new Composite(cc, SWT.NONE); >+ GridLayout gridLayout = new GridLayout(1, false); >+ gridLayout.marginWidth = 0; >+ gridLayout.marginHeight = 0; >+ comp.setLayout(gridLayout); >+ >+ Label label = new Label(comp, SWT.NONE); >+ label.setText("Reported In:"); >+ createReportedInViewer(comp); >+ } >+ // cc.setWeights(new int[] {1,1,1,1}); > } > > Label lblQuery = new Label(c, SWT.NONE); > lblQuery.setLayoutData(new GridData()); > lblQuery.setText("Query:"); > queryString = new Text(c, SWT.BORDER); >- queryString.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false, 2, 1)); >+ queryString.setLayoutData(new GridData(SWT.FILL, SWT.FILL, false, false, 4, 1)); > // TODO put content assist here and a label describing what is available > > queryString.addFocusListener(new FocusAdapter() { >@@ -239,16 +261,6 @@ > } > > }); >- new Label(c, SWT.NONE); >- >- // Need to turn off validation here >- if (isNew) { >- loadFromDefaults(); >- } else { >- loadFromWorkingCopy(); >- } >- >- setControl(c); > > searchComments = new Button(c, SWT.CHECK); > searchComments.setLayoutData(new GridData()); >@@ -262,7 +274,7 @@ > }); > > searchEnvironment = new Button(c, SWT.CHECK); >- searchEnvironment.setLayoutData(new GridData()); >+ searchEnvironment.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, true, false)); > searchEnvironment.setText("Environment"); > searchEnvironment.addSelectionListener(new SelectionAdapter() { > >@@ -271,12 +283,20 @@ > } > > }); >+ >+ // Need to turn off validation here >+ if (isNew) { >+ loadFromDefaults(); >+ } else { >+ loadFromWorkingCopy(); >+ } >+ >+ setControl(c); > } > > public IWizardPage getNextPage() { > if (issueAttributesPage == null) { >- issueAttributesPage = new IssueAttributesPage(repository, "issueAttributes", "Issue Attributes", null, >- workingCopy, isNew); >+ issueAttributesPage = new IssueAttributesPage(repository, workingCopy, isNew); > issueAttributesPage.setWizard(getWizard()); > } > >@@ -284,11 +304,11 @@ > } > > private void createReportedInViewer(Composite c) { >- GridData gd; >- reportedIn = new ListViewer(c, SWT.MULTI | SWT.BORDER | SWT.V_SCROLL); >- gd = new GridData(SWT.FILL, SWT.FILL, true, true); >- gd.heightHint = 40; >- reportedIn.getControl().setLayoutData(gd); >+ reportedIn = new ListViewer(c, SWT.V_SCROLL | SWT.MULTI | SWT.BORDER | SWT.H_SCROLL); >+ GridData gridData = new GridData(SWT.FILL, SWT.FILL, true, true); >+ gridData.heightHint = 200; >+ gridData.widthHint = 80; >+ reportedIn.getControl().setLayoutData(gridData); > > reportedIn.setContentProvider(new IStructuredContentProvider() { > private Project project; >@@ -327,11 +347,11 @@ > } > > private void createComponentsViewer(Composite c) { >- GridData gd; >- components = new ListViewer(c, SWT.MULTI | SWT.BORDER | SWT.V_SCROLL); >- gd = new GridData(SWT.FILL, SWT.FILL, true, true); >- gd.heightHint = 40; >- components.getControl().setLayoutData(gd); >+ components = new ListViewer(c, SWT.V_SCROLL | SWT.MULTI | SWT.BORDER | SWT.H_SCROLL); >+ GridData gridData = new GridData(SWT.FILL, SWT.FILL, true, true); >+ gridData.heightHint = 200; >+ gridData.widthHint = 80; >+ components.getControl().setLayoutData(gridData); > > components.setContentProvider(new IStructuredContentProvider() { > private Project project; >@@ -362,11 +382,11 @@ > } > > private void createFixForViewer(Composite c) { >- GridData gd; >- fixFor = new ListViewer(c, SWT.MULTI | SWT.BORDER | SWT.V_SCROLL); >- gd = new GridData(SWT.FILL, SWT.FILL, true, true); >- gd.heightHint = 40; >- fixFor.getControl().setLayoutData(gd); >+ fixFor = new ListViewer(c, SWT.V_SCROLL | SWT.MULTI | SWT.BORDER | SWT.H_SCROLL); >+ GridData gridData = new GridData(SWT.FILL, SWT.FILL, true, true); >+ gridData.heightHint = 200; >+ gridData.widthHint = 80; >+ fixFor.getControl().setLayoutData(gridData); > > fixFor.setContentProvider(new IStructuredContentProvider() { > private Project project; >@@ -405,8 +425,12 @@ > } > > private void createProjectsViewer(Composite c) { >- project = new ListViewer(c, SWT.V_SCROLL | SWT.MULTI | SWT.BORDER); >- project.getControl().setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true)); >+ project = new ListViewer(c, SWT.V_SCROLL | SWT.MULTI | SWT.BORDER | SWT.H_SCROLL); >+ GridData gridData = new GridData(SWT.FILL, SWT.FILL, true, true); >+ gridData.heightHint = 200; >+ gridData.widthHint = 120; >+ project.getControl().setLayoutData(gridData); >+ > project.setContentProvider(new IStructuredContentProvider() { > > public void inputChanged(Viewer viewer, Object oldInput, Object newInput) { >Index: src/org/eclipse/mylar/internal/jira/ui/wizards/EditJiraQueryWizard.java >=================================================================== >RCS file: /home/technology/org.eclipse.mylar/org.eclipse.mylar.jira/src/org/eclipse/mylar/internal/jira/ui/wizards/EditJiraQueryWizard.java,v >retrieving revision 1.2 >diff -u -r1.2 EditJiraQueryWizard.java >--- src/org/eclipse/mylar/internal/jira/ui/wizards/EditJiraQueryWizard.java 17 May 2006 15:40:28 -0000 1.2 >+++ src/org/eclipse/mylar/internal/jira/ui/wizards/EditJiraQueryWizard.java 29 May 2006 06:34:33 -0000 >@@ -27,6 +27,7 @@ > > public EditJiraQueryWizard(TaskRepository repository, AbstractRepositoryQuery query) { > super(repository, query); >+ setForcePreviousAndNextButtons(true); > // this.repository = repository; > // this.query = query; > // setNeedsProgressMonitor(true); >Index: src/org/eclipse/mylar/internal/jira/ui/wizards/IssueAttributesPage.java >=================================================================== >RCS file: /home/technology/org.eclipse.mylar/org.eclipse.mylar.jira/src/org/eclipse/mylar/internal/jira/ui/wizards/IssueAttributesPage.java,v >retrieving revision 1.1 >diff -u -r1.1 IssueAttributesPage.java >--- src/org/eclipse/mylar/internal/jira/ui/wizards/IssueAttributesPage.java 28 Apr 2006 17:49:36 -0000 1.1 >+++ src/org/eclipse/mylar/internal/jira/ui/wizards/IssueAttributesPage.java 29 May 2006 06:34:33 -0000 >@@ -15,7 +15,6 @@ > import java.util.Iterator; > import java.util.List; > >-import org.eclipse.jface.resource.ImageDescriptor; > import org.eclipse.jface.viewers.ComboViewer; > import org.eclipse.jface.viewers.ISelectionChangedListener; > import org.eclipse.jface.viewers.IStructuredContentProvider; >@@ -118,10 +117,8 @@ > * @param titleImage > * @param server > */ >- protected IssueAttributesPage(TaskRepository repository, String pageName, String title, ImageDescriptor titleImage, >- FilterDefinition workingCopy, boolean isNew) { >- super(pageName, title, titleImage); >-// this.repository = repository; >+ protected IssueAttributesPage(TaskRepository repository, FilterDefinition workingCopy, boolean isNew) { >+ super("issueAttributes", "Issue Attributes", null); > this.jiraServer = JiraServerFacade.getDefault().getJiraServer(repository); > this.workingCopy = workingCopy; > this.isNew = isNew; >@@ -277,19 +274,15 @@ > > Label lblIssueType = new Label(c, SWT.NONE); > lblIssueType.setText("Type:"); >- lblIssueType.setLayoutData(new GridData(SWT.FILL, SWT.TOP, false, false)); > > Label lblStatus = new Label(c, SWT.NONE); > lblStatus.setText("Status:"); >- lblStatus.setLayoutData(new GridData(SWT.FILL, SWT.TOP, false, false)); > > Label lblResolution = new Label(c, SWT.NONE); > lblResolution.setText("Resolution:"); >- lblResolution.setLayoutData(new GridData(SWT.FILL, SWT.TOP, false, false)); > > Label lblPriority = new Label(c, SWT.NONE); > lblPriority.setText("Priority:"); >- lblPriority.setLayoutData(new GridData(SWT.FILL, SWT.TOP, false, false)); > > issueType = new ListViewer(c, SWT.MULTI | SWT.BORDER | SWT.V_SCROLL); > gd = new GridData(SWT.FILL, SWT.FILL, true, true); >Index: src/org/eclipse/mylar/internal/jira/ui/wizards/JiraQueryWizardPage.java >=================================================================== >RCS file: /home/technology/org.eclipse.mylar/org.eclipse.mylar.jira/src/org/eclipse/mylar/internal/jira/ui/wizards/JiraQueryWizardPage.java,v >retrieving revision 1.9 >diff -u -r1.9 JiraQueryWizardPage.java >--- src/org/eclipse/mylar/internal/jira/ui/wizards/JiraQueryWizardPage.java 28 Apr 2006 17:49:36 -0000 1.9 >+++ src/org/eclipse/mylar/internal/jira/ui/wizards/JiraQueryWizardPage.java 29 May 2006 06:34:33 -0000 >@@ -76,11 +76,7 @@ > private AbstractRepositoryQuery query; > > public JiraQueryWizardPage(TaskRepository repository) { >- super(TITLE); >- this.repository = repository; >- setTitle(TITLE); >- setDescription(DESCRIPTION); >- setPageComplete(false); >+ this(repository, null); > } > > public JiraQueryWizardPage(TaskRepository repository, AbstractRepositoryQuery query) { >@@ -157,11 +153,17 @@ > return null; > } > if (filterSummaryPage == null) { >- FilterDefinition workingCopy = new FilterDefinition(); >- boolean isAdd = true; >+ FilterDefinition workingCopy; >+ boolean isNew; >+ if(query instanceof JiraCustomQuery) { >+ workingCopy = ((JiraCustomQuery) query).getFilterDefinition(); >+ isNew = false; >+ } else { >+ workingCopy = new FilterDefinition(); >+ isNew = true; >+ } > >- filterSummaryPage = new FilterSummaryPage(repository, "summaryPage", "Filter Summary", null, workingCopy, >- isAdd); >+ filterSummaryPage = new FilterSummaryPage(repository, workingCopy, isNew); > filterSummaryPage.setWizard(getWizard()); > } > return filterSummaryPage; >@@ -220,6 +222,7 @@ > } > > filterCombo.select(n); >+ filterCombo.showSelection(); > setPageComplete(true); > } >
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 139314
:
42676
| 42840