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 106307 Details for
Bug 224562
Provide more flexible way to compare files
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Initial patch once again. This time complete.
initial-patch-2 (text/plain), 7.23 KB, created by
Aleksandra Wozniak
on 2008-07-02 09:01:33 EDT
(
hide
)
Description:
Initial patch once again. This time complete.
Filename:
MIME Type:
Creator:
Aleksandra Wozniak
Created:
2008-07-02 09:01:33 EDT
Size:
7.23 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.compare >Index: plugin.xml >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.compare/plugin.xml,v >retrieving revision 1.65 >diff -u -r1.65 plugin.xml >--- plugin.xml 11 Jul 2007 14:59:33 -0000 1.65 >+++ plugin.xml 2 Jul 2008 12:59:29 -0000 >@@ -201,6 +201,14 @@ > enablesFor="2+" > id="compareWithEachOther"> > </action> >+ <action >+ class="org.eclipse.compare.CompareWithOtherResourceAction" >+ enablesFor="1" >+ id="compareWithOtherResource" >+ label="%CompareWithOtherResource.label" >+ menubarPath="compareWithMenu/compareWithGroup" >+ tooltip="%CompareWithOtherResourceAction.tooltip"> >+ </action> > </objectContribution> > <objectContribution > objectClass="org.eclipse.core.resources.IFile" >Index: plugin.properties >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.compare/plugin.properties,v >retrieving revision 1.91 >diff -u -r1.91 plugin.properties >--- plugin.properties 22 Apr 2008 10:27:12 -0000 1.91 >+++ plugin.properties 2 Jul 2008 12:59:29 -0000 >@@ -83,6 +83,9 @@ > CompareWithEachOtherAction.label= &Each Other > CompareWithEachOtherAction.tooltip= Compare the Selected Resources > >+CompareWithOtherResource.label= &Other Resource >+CompareWithOtherResource.tooltip= Open the 'Compare With' Dialog >+ > CompareWithHistoryAction.label= &Local History... > CompareWithHistoryAction.tooltip= Compare the Selected Resource with Local History > >Index: compare/org/eclipse/compare/CompareWithOtherResourceAction.java >=================================================================== >RCS file: compare/org/eclipse/compare/CompareWithOtherResourceAction.java >diff -N compare/org/eclipse/compare/CompareWithOtherResourceAction.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ compare/org/eclipse/compare/CompareWithOtherResourceAction.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,34 @@ >+package org.eclipse.compare; >+ >+import org.eclipse.jface.action.IAction; >+import org.eclipse.jface.viewers.ISelection; >+import org.eclipse.swt.widgets.Shell; >+import org.eclipse.ui.IObjectActionDelegate; >+import org.eclipse.ui.IWorkbenchPart; >+import org.eclipse.ui.PlatformUI; >+ >+public class CompareWithOtherResourceAction implements IObjectActionDelegate { >+ >+ Shell shell; >+ CompareWithOtherResourceDialog dialog; >+ >+ public CompareWithOtherResourceAction() { >+ shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(); >+ } >+ >+ public void setActivePart(IAction action, IWorkbenchPart targetPart) { >+ // TODO Auto-generated method stub >+ >+ } >+ >+ public void run(IAction action) { >+ dialog = new CompareWithOtherResourceDialog(shell); >+ dialog.open(); >+ } >+ >+ public void selectionChanged(IAction action, ISelection selection) { >+ // TODO Auto-generated method stub >+ >+ } >+ >+} >Index: compare/org/eclipse/compare/CompareWithOtherResourceDialog.java >=================================================================== >RCS file: compare/org/eclipse/compare/CompareWithOtherResourceDialog.java >diff -N compare/org/eclipse/compare/CompareWithOtherResourceDialog.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ compare/org/eclipse/compare/CompareWithOtherResourceDialog.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,128 @@ >+package org.eclipse.compare; >+ >+import org.eclipse.jface.dialogs.Dialog; >+import org.eclipse.swt.SWT; >+import org.eclipse.swt.events.SelectionEvent; >+import org.eclipse.swt.events.SelectionListener; >+import org.eclipse.swt.layout.FillLayout; >+import org.eclipse.swt.layout.GridData; >+import org.eclipse.swt.layout.GridLayout; >+import org.eclipse.swt.widgets.Button; >+import org.eclipse.swt.widgets.Composite; >+import org.eclipse.swt.widgets.Control; >+import org.eclipse.swt.widgets.Group; >+import org.eclipse.swt.widgets.Label; >+import org.eclipse.swt.widgets.Shell; >+import org.eclipse.swt.widgets.Text; >+ >+ >+public class CompareWithOtherResourceDialog extends Dialog { >+ >+ private class InternalGroup { >+ >+ Group group; >+ Composite parent; >+ >+ public InternalGroup(Composite parent) { >+ createContents(parent); >+ } >+ >+ public void createContents(Composite parent) { >+ >+ GridLayout layout = new GridLayout(); >+ layout.numColumns = 3; >+ group = new Group(parent, SWT.NONE); >+ group.setLayout(layout); >+ GridData gridData = new GridData(); >+ gridData.grabExcessHorizontalSpace = true; >+ gridData.grabExcessVerticalSpace = true; >+ group.setLayoutData(gridData); >+ >+ Label fileLabel = new Label(group, SWT.NONE); >+ fileLabel.setText("File: "); >+ >+ Text ancestor = new Text(group, SWT.SINGLE | SWT.BORDER); >+ GridData textData = new GridData(); >+ //textData.horizontalSpan = 2; >+ textData.grabExcessHorizontalSpace = true; >+ textData.horizontalAlignment = SWT.FILL; >+ ancestor.setLayoutData(textData); >+ >+ createButtons(group); >+ } >+ >+ public Composite createButtons(Composite parent) { >+ >+ Composite buttons = new Composite(parent, SWT.FILL); >+ FillLayout buttonsLayout = new FillLayout(); >+ buttonsLayout.type = SWT.VERTICAL; >+ buttons.setLayout(buttonsLayout); >+ >+ Button openTypeButton = new Button(buttons, SWT.PUSH); >+ openTypeButton.setText("Open Type..."); >+ openTypeButton.addSelectionListener(new SelectionListener() { >+ >+ public void widgetDefaultSelected(SelectionEvent e) { >+ >+ } >+ >+ public void widgetSelected(SelectionEvent e) { >+ >+ } >+ >+ }); >+ >+ Button openFileButton = new Button(buttons, SWT.PUSH); >+ openFileButton.setText("Open File..."); >+ >+ Button openResourceButton = new Button(buttons, SWT.PUSH); >+ openResourceButton.setText("Open Resource..."); >+ >+ return buttons; >+ } >+ >+ public void setText(String text) { >+ group.setText(text); >+ } >+ >+ public void setLayoutData(GridData layoutData) { >+ group.setLayoutData(layoutData); >+ } >+ >+ } >+ >+ Button okButton, cancelButton; >+ >+ protected CompareWithOtherResourceDialog(Shell shell) { >+ super(shell); >+ setShellStyle(SWT.MODELESS | SWT.TITLE); >+ } >+ >+ protected Control createDialogArea(Composite parent) { >+ >+ Composite mainPanel = new Composite(parent, SWT.NULL); >+ GridLayout layout = new GridLayout(); >+ layout.numColumns = 2; >+ layout.makeColumnsEqualWidth = true; >+ mainPanel.setLayout(layout); >+ mainPanel.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true)); >+ >+ InternalGroup ancestorPanel = new InternalGroup(mainPanel); >+ ancestorPanel.setText("Ancestor"); >+ GridData ancestorGD = new GridData(SWT.FILL, SWT.FILL, true, true); >+ ancestorGD.horizontalSpan = 2; >+ ancestorPanel.setLayoutData(ancestorGD); >+ >+ InternalGroup leftPanel = new InternalGroup(mainPanel); >+ leftPanel.setText("Left panel"); >+ GridData leftGD = new GridData(SWT.FILL, SWT.FILL, true, true); >+ leftPanel.setLayoutData(leftGD); >+ >+ InternalGroup rightPanel = new InternalGroup(mainPanel); >+ rightPanel.setText("Right panel"); >+ GridData rightGD = new GridData(SWT.FILL, SWT.FILL, true, true); >+ rightPanel.setLayoutData(rightGD); >+ >+ return mainPanel; >+ } >+}
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 224562
:
106306
|
106307