Java Code Examples for org.eclipse.swt.custom.StyledText#setEditable()

The following examples show how to use org.eclipse.swt.custom.StyledText#setEditable() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: StyledTextCellEditor.java    From translationstudio8 with GNU General Public License v2.0 6 votes vote down vote up
@Override
protected void setupReadOnlyMode() {
	checkWidget();

	StyledText text = viewer.getTextWidget();
	if (!close) {
		if (!editable) {
			return;
		}
		text.removeVerifyKeyListener(edit_VerifyKey);
		text.removeTraverseListener(edit_Traverse);
	}
	editable = false;
	text.setEditable(false);
	text.addVerifyKeyListener(readOnly_VerifyKey);
}
 
Example 2
Source File: BibtexEditor.java    From slr-toolkit with Eclipse Public License 1.0 6 votes vote down vote up
private void createAbstractText(Composite composite) {
	GridData gridData = new GridData();
	gridData.horizontalAlignment = SWT.FILL;
	gridData.grabExcessHorizontalSpace = true;
	gridData.verticalAlignment = SWT.FILL;
	gridData.grabExcessVerticalSpace = true;
	gridData.verticalSpan = 1;
	gridData.horizontalSpan = 2;
	
	StyledText text = new StyledText(composite, SWT.V_SCROLL | SWT.READ_ONLY | SWT.WRAP);
	text.setEditable(false);
	text.setLayoutData(gridData);
	if (document.getAbstract() != null) {
		text.setText(document.getAbstract());
	}
}
 
Example 3
Source File: ScrolledTextEx.java    From SWET with MIT License 6 votes vote down vote up
private StyledText createStyledText() {
	styledText = new StyledText(shell,
			SWT.BORDER | SWT.MULTI | SWT.V_SCROLL | SWT.H_SCROLL); // SWT.WRAP
	GridData gridData = new GridData();
	styledText.setFont(
			new Font(shell.getDisplay(), "Source Code Pro Light", 10, SWT.NORMAL));
	gridData.horizontalAlignment = GridData.FILL;
	gridData.grabExcessHorizontalSpace = true;
	gridData.verticalAlignment = GridData.FILL;
	gridData.grabExcessVerticalSpace = true;
	styledText.setLayoutData(gridData);
	styledText.addLineStyleListener(lineStyler);
	styledText.setEditable(false);
	styledText
			.setBackground(Display.getDefault().getSystemColor(SWT.COLOR_GRAY));
	return styledText;
}
 
Example 4
Source File: ParamView.java    From http4e with Apache License 2.0 6 votes vote down vote up
void setEditable( boolean editable){
   StyledText st = (StyledText) textView.getControl();
   if (editable) {
      // bodyText.setFont(ResourceUtils.getFont(Styles.FONT_COURIER));
      st.setForeground(ResourceUtils.getColor(Styles.GRAY_RGB_TEXT));
      st.setBackground(ResourceUtils.getColor(Styles.BACKGROUND_ENABLED));
      st.setEditable(true);
      attachManager.setEnabled(true);

   } else {
      // bodyText.setFont(ResourceUtils.getFont(Styles.FONT_COURIER));
      st.setForeground(ResourceUtils.getColor(Styles.LIGHT_RGB_TEXT));
      st.setBackground(ResourceUtils.getColor(Styles.PINK_DISABLED));
      st.setEditable(false);
      attachManager.setEnabled(false);
   }
}
 
Example 5
Source File: ExportJavaViewer.java    From http4e with Apache License 2.0 6 votes vote down vote up
void createStyledText(Composite parent){
      text = new StyledText(parent, SWT.BORDER | SWT.MULTI | SWT.V_SCROLL | SWT.H_SCROLL);
//      text.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
      GridData spec = new GridData();
      spec.heightHint = HEIGHT;
      spec.widthHint = WEIGHT;
      spec.horizontalAlignment = GridData.FILL;
      spec.grabExcessHorizontalSpace = true;
      spec.verticalAlignment = GridData.FILL;
      spec.grabExcessVerticalSpace = true;
      text.setLayoutData(spec);
      text.addLineStyleListener(lineStyler);
      text.setEditable(false);
      Color bg = Display.getDefault().getSystemColor(SWT.COLOR_WHITE);
      text.setBackground(bg);
   }
 
Example 6
Source File: StyledTextCellEditor.java    From tmxeditor8 with GNU General Public License v2.0 6 votes vote down vote up
@Override
protected void setupReadOnlyMode() {
	checkWidget();

	StyledText text = viewer.getTextWidget();
	if (!close) {
		if (!editable) {
			return;
		}
		text.removeVerifyKeyListener(edit_VerifyKey);
		text.removeTraverseListener(edit_Traverse);
	}
	editable = false;
	text.setEditable(false);
	text.addVerifyKeyListener(readOnly_VerifyKey);
}
 
Example 7
Source File: SeparatorPanel.java    From tmxeditor8 with GNU General Public License v2.0 5 votes vote down vote up
public void initComponents(String label) {
       GridLayout gridLayout = new GridLayout(2, false);
	setLayout(gridLayout);
	
	GridData layoutData = new GridData();
	layoutData.grabExcessHorizontalSpace = true;
	layoutData.horizontalAlignment = GridData.FILL;
	setLayoutData(layoutData);

	// Text label
	StyledText gridLinesLabel = new StyledText(this, SWT.NONE);
	gridLinesLabel.setEditable(false);
	Display display = Display.getDefault();
	FontData data = display .getSystemFont().getFontData()[0];
	Font font = new Font(display, data.getName(), data.getHeight(), SWT.BOLD);
	gridLinesLabel.setFont(font);
	gridLinesLabel.setBackground(Display.getCurrent().getSystemColor (SWT.COLOR_WIDGET_BACKGROUND));
	gridLinesLabel.setText(label);

	// Separator line
	Label separator = new Label (this, SWT.SEPARATOR | SWT.HORIZONTAL);
	GridData separatorData = new GridData();
	separatorData.grabExcessHorizontalSpace = true;
	separatorData.horizontalAlignment = GridData.FILL;
	separatorData.horizontalIndent = 5;
	separator.setLayoutData(separatorData);
}
 
Example 8
Source File: TextDiffDialog.java    From olca-app with Mozilla Public License 2.0 5 votes vote down vote up
private void createText(Composite parent, String value, String otherValue, Site site) {
	StyledString styled = new StyledString(value);
	new DiffStyle().applyTo(styled, otherValue, site, action);
	StyledText text = new StyledText(parent, SWT.BORDER | SWT.MULTI | SWT.V_SCROLL | SWT.WRAP);
	text.setText(styled.toString());
	text.setStyleRanges(styled.getStyleRanges());
	text.setEditable(false);
	text.setBackground(Colors.white());
	UI.gridData(text, true, true);
}
 
Example 9
Source File: ClassFileEditor.java    From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 5 votes vote down vote up
private StyledText createCodeView(Composite parent) {
	int styles= SWT.V_SCROLL | SWT.H_SCROLL | SWT.MULTI | SWT.FULL_SELECTION;
	StyledText styledText= new StyledText(parent, styles);
	styledText.setBackground(fBackgroundColor);
	styledText.setForeground(fForegroundColor);
	styledText.setEditable(false);
	return styledText;
}
 
Example 10
Source File: CustomMessageDialog.java    From tmxeditor8 with GNU General Public License v2.0 5 votes vote down vote up
@Override
protected Control createMessageArea(Composite composite) {
	Image image = getImage();
	if (image != null) {
		imageLabel = new Label(composite, SWT.NULL);
		image.setBackground(imageLabel.getBackground());
		imageLabel.setImage(image);
		addAccessibleListeners(imageLabel, image);
		GridDataFactory.fillDefaults().align(SWT.CENTER, SWT.BEGINNING)
				.applyTo(imageLabel);
	}
	// create message
	if (message != null) {
		text = new StyledText(composite, getMessageLabelStyle());
		text.setBackground(composite.getBackground());
		text.setText(message);
		text.setEditable(false);
		GridDataFactory
				.fillDefaults()
				.align(SWT.FILL, SWT.BEGINNING)
				.grab(true, false)
				.hint(
						convertHorizontalDLUsToPixels(IDialogConstants.MINIMUM_MESSAGE_AREA_WIDTH),
						SWT.DEFAULT).applyTo(text);
		setStyle();
	}
	return composite;
}
 
Example 11
Source File: FormHelper.java    From tlaplus with MIT License 5 votes vote down vote up
public static SourceViewer createSourceViewer(Composite parent, int flags, SourceViewerConfiguration config)
{
    SourceViewer sourceViewer = new SourceViewer(parent, null, null, false, flags);
    sourceViewer.configure(config);
    sourceViewer.setTabsToSpacesConverter(getTabToSpacesConverter());

    StyledText control = sourceViewer.getTextWidget();
    control.setWordWrap(true);
    control.setFont(TLCUIActivator.getDefault().getCourierFont());
    control.setEditable(true);
    return sourceViewer;
}
 
Example 12
Source File: ChatLine.java    From saros with GNU General Public License v2.0 5 votes vote down vote up
public ChatLine(Composite parent, String message) {
  super(parent, SWT.NONE);
  this.setLayout(new FillLayout());

  text = new StyledText(this, SWT.WRAP);
  text.setText(message);
  text.setEditable(false);
  decorateHyperLinks(text);
  addHyperLinkListener(text);
}
 
Example 13
Source File: SuffixText.java    From n4js with Eclipse Public License 1.0 5 votes vote down vote up
/**
 * Creates, configures and returns the suffix text control.
 */
private StyledText createSuffixText() {
	StyledText styledText = new StyledText(this, SWT.TRANSPARENT);
	styledText.setText("");
	styledText.setForeground(INACTIVE_COLOR);
	styledText.setBackground(getDisplay().getSystemColor(SWT.COLOR_TRANSPARENT));
	styledText.setEditable(false);
	styledText.setEnabled(false);
	styledText.setLeftMargin(0);

	return styledText;
}
 
Example 14
Source File: ProblemView.java    From tlaplus with MIT License 4 votes vote down vote up
/**
 * Fill data
 * @param specLoaded
 */
private void fillData(Spec specLoaded)
{
    if (specLoaded == null)
    {
        hide();
        return;
    } else
    {

        // retrieve the markers associated with the loaded spec
        IMarker[] markers = TLAMarkerHelper.getProblemMarkers(specLoaded.getProject(), null);

        if (markers == null || markers.length == 0)
        {
            hide();
        }

        // sort the markers
        List<IMarker> markersList = new ArrayList<IMarker>(Arrays.asList(markers));
        Collections.sort(markersList, new MarkerComparator());

        // Bug fix: 2 June 2010.  It takes forever if
        // there are a large number of markers, which
        // can easily happen if you remove a definition
        // that's used hundreds of times.
        int iterations = Math.min(markers.length, 20);
        for (int j = 0; j < iterations; j++)
        {
            final IMarker problem = markersList.get(j);

            // listener
            Listener listener = new Listener() {
                // goto marker on click
                public void handleEvent(Event event)
                {
                    TLAMarkerHelper.gotoMarker(problem, ((event.stateMask & SWT.MOD1) != 0));
                }
            };

            // contents of the item
            Composite problemItem = new Composite(bar, SWT.LINE_SOLID);
            problemItem.setLayout(new RowLayout(SWT.VERTICAL));
            problemItem.addListener(SWT.MouseDown, listener);

            String[] lines = problem.getAttribute(IMarker.MESSAGE, "").split("\n");
            for (int i = 0; i < lines.length; i++)
            {
                StyledText styledText = new StyledText(problemItem, SWT.INHERIT_DEFAULT);
                styledText.setEditable(false);
                styledText.setCursor(styledText.getDisplay().getSystemCursor(SWT.CURSOR_HAND));
                styledText.setText(lines[i]);
                styledText.addListener(SWT.MouseDown, listener);

                if (isErrorLine(lines[i], problem))
                {
                    StyleRange range = new StyleRange();
                    range.underline = true;
                    range.foreground = styledText.getDisplay().getSystemColor(SWT.COLOR_RED);
                    range.start = 0;
                    range.length = lines[i].length();
                    styledText.setStyleRange(range);
                }
            }

            ExpandItem item = new ExpandItem(bar, SWT.NONE, 0);
            item.setExpanded(true);
            
            String markerType = TLAMarkerHelper.getType(problem);
            item.setText(AdapterFactory.getMarkerTypeAsText(markerType) + " " + AdapterFactory.getSeverityAsText(problem.getAttribute(IMarker.SEVERITY,
                    IMarker.SEVERITY_ERROR)));
            item.setHeight(problemItem.computeSize(SWT.DEFAULT, SWT.DEFAULT).y);
            item.setControl(problemItem);
            item.addListener(SWT.MouseDown, listener);
        }
    }
    return ;
}
 
Example 15
Source File: ExecutionStatisticsDialog.java    From tlaplus with MIT License 4 votes vote down vote up
@Override
  protected Control createCustomArea(Composite parent) {
final Composite c = new Composite(parent, SWT.BORDER);
c.setLayout(new GridLayout());
c.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));

//NOTE: Take care of ExecutionStatisticsCollector.md when updating!!!
final String txt = String.format("%s"
		+ "* Total number of cores and cores assigned to TLC\n"
		+ "* Heap and off-heap memory allocated to TLC\n"
		+ "* TLC's version (git commit SHA)\n"
		+ "* If breadth-first search, depth-first search or simulation mode is active\n"
		+ "* TLC's implementation for the sets of seen and unseen states\n"
		+ "* If TLC has been launched from the TLA Toolbox\n"
		+ "* Name, version, and architecture of your operating system\n"
		+ "* Vendor, version, and architecture of your Java virtual machine\n"
		+ "* The current date and time\n"
		+ "* An installation identifier which allows us to group execution statistics\n\n"
		+ "The execution statistics do not contain personal information. If you wish to revoke\n"
		+ "your consent to share execution statistics at a later point, please chose \n"
		+ "\"Never Share Execution Statistics\" below by re-opening this dialog via\n"
		+ "Help > Opt In/Out Execution Statistics accessible from the Toolbox's main menu.", prettyPrintSelection2(esc));

final StyledText st = new StyledText(c, SWT.SHADOW_NONE | SWT.WRAP);
st.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));

st.setEnabled(true);
st.setEditable(false);
st.setText(txt);

final StyleRange[] ranges = new StyleRange[3];
ranges[0] = new StyleRange(txt.indexOf("(TLC) execution statistics"), "(TLC) execution statistics".length(), null, null);
ranges[0].underline = true;
ranges[0].underlineStyle = SWT.UNDERLINE_LINK;
ranges[0].data = "https://exec-stats.tlapl.us";

ranges[1] = new StyleRange(txt.indexOf("publicly available"), "publicly available".length(), null, null);
ranges[1].underline = true;
ranges[1].underlineStyle = SWT.UNDERLINE_LINK;
ranges[1].data = "https://exec-stats.tlapl.us/tlaplus.csv";
		
ranges[2] = new StyleRange(txt.indexOf("git commit SHA"), "git commit SHA".length(), null, null);
ranges[2].underline = true;
ranges[2].underlineStyle = SWT.UNDERLINE_LINK;
ranges[2].data = "https://git-scm.com/book/en/v2/Git-Internals-Git-Objects";

st.setStyleRanges(ranges);
st.addMouseListener(new MouseAdapter() {
	@Override
	public void mouseUp(final MouseEvent event) {
              final int offset = st.getOffsetAtPoint(new Point(event.x, event.y));
              if (offset < 0 || offset >= st.getCharCount()) {
              	return;
              }
		final StyleRange style = st.getStyleRangeAtOffset(offset);
              if (style != null && style.underline && style.underlineStyle == SWT.UNDERLINE_LINK && style.data instanceof String) {
                  try {
				PlatformUI.getWorkbench().getBrowserSupport().getExternalBrowser().openURL(new URL((String) style.data));
			} catch (PartInitException | MalformedURLException notExpectedToHappen) {
				notExpectedToHappen.printStackTrace();
			}
              }
	}
});
	
      return c;
  }
 
Example 16
Source File: NaiveShowTab.java    From Rel with Apache License 2.0 4 votes vote down vote up
protected Composite getContents(Composite parent) {
	definition = new StyledText(parent, SWT.BORDER | SWT.V_SCROLL | SWT.H_SCROLL);
	definition.setEditable(false);
	definition.setWordWrap(true);
	return definition;
}
 
Example 17
Source File: CheckForUpdates.java    From Rel with Apache License 2.0 4 votes vote down vote up
/**
 * Create the composite.
 * 
 * @param parent
 * @param style
 */
public CheckForUpdates(Composite parent, int style) {
	super(parent, style);
	GridLayout gridLayout = new GridLayout(1, false);
	gridLayout.marginHeight = 0;
	gridLayout.marginWidth = 0;
	gridLayout.verticalSpacing = 0;
	gridLayout.horizontalSpacing = 0;
	setLayout(gridLayout);
	setVisible(false);

	txtStatus = new StyledText(this, SWT.WRAP);
	txtStatus.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));
	txtStatus.setEditable(false);
	txtStatus.setForeground(SWTResourceManager.getColor(SWT.COLOR_BLACK));
	txtStatus.setBackground(getBackground());
	txtStatus.setFont(FontSize.getThisFontInNewSize(txtStatus.getFont(), 10, SWT.NORMAL));
	txtStatus.addMouseListener(mouseHandler);
	txtStatus.setCaret(new Caret(txtStatus, SWT.NONE));
	setText("Rel updates?");

	updateChecker = new UpdatesCheck(parent.getDisplay()) {
		@Override
		public void completed(SendStatus sendStatus) {
			CheckForUpdates.this.completed(sendStatus);
		}
	};

	TimerTask checkForUpdates = new TimerTask() {
		@Override
		public void run() {
			if (CheckForUpdates.this.isDisposed())
				return;
			getDisplay().asyncExec(() -> {
				if (CheckForUpdates.this.isDisposed())
					return;
				setVisible(true);
				setText("Rel updates?");
				System.out.println("CheckForUpdates: check for updates.");
				updateChecker.doCancel();
				updateChecker.doSend();
			});
		}
	};

	// Check for updates after 10 seconds, then every 12 hours
	Timer checkTimer = new Timer();
	checkTimer.schedule(checkForUpdates, 1000 * 5, 1000 * 60 * 60 * 12);
}
 
Example 18
Source File: StatisticsView.java    From CogniCrypt with Eclipse Public License 2.0 4 votes vote down vote up
@Override
public void createPartControl(Composite parent) {
	GridLayout layout = new GridLayout(3, false);
	parent.setLayout(layout);
	resultsEnabled = true;

	// Project Name
	Label projectnameLabel = new Label(parent, SWT.NONE);
	projectnameLabel.setText("Project Name: ");
	projectname = new StyledText(parent, SWT.NONE);
	projectname.setLayoutData(new GridData(GridData.GRAB_HORIZONTAL | GridData.HORIZONTAL_ALIGN_FILL));
	projectname.setText("Nothing for now");
	projectname.setEditable(false);

	// Refresh Button
	reRunButton = new Button(parent, SWT.PUSH);
	reRunButton.setText("Rerun the Analysis on this Project");
	reRunButton.setEnabled(false);
	reRunButton.setLayoutData(new GridData(SWT.END, SWT.CENTER, false, false));
	// register listener for the selection event
	reRunButton.addSelectionListener(new SelectionListener() {
		@Override
		public void widgetSelected(SelectionEvent e) {
			final AnalysisKickOff runningAnalysis = new AnalysisKickOff();
			runningAnalysis.setUp(JavaCore.create(lastProject));
			runningAnalysis.run();
			resultsEnabled = true;
		}

		@Override
		public void widgetDefaultSelected(SelectionEvent arg0) {}

	});

	// Time of Analysis
	Label timeofanalysisLabel = new Label(parent, SWT.NONE);
	timeofanalysisLabel.setText("Time of Analysis: ");
	timeofanalysis = new StyledText(parent, SWT.NONE);
	timeofanalysis.setLayoutData(new GridData(GridData.GRAB_HORIZONTAL | GridData.HORIZONTAL_ALIGN_FILL));
	timeofanalysis.setWordWrap(true);
	timeofanalysis.setEditable(false);

	// Results Table
	createViewer(parent);
}
 
Example 19
Source File: IllegalBinaryStateDialog.java    From n4js with Eclipse Public License 1.0 4 votes vote down vote up
/**
 * Creates a control with some message and with link to the Binaries preference page.
 *
 * @param parent
 *            the parent composite.
 * @param dialog
 *            the container dialog that has to be closed.
 * @param binary
 *            the binary with the illegal state.
 *
 * @return a control with error message and link that can be reused in dialogs.
 */
public static Control createCustomAreaWithLink(final Composite parent, final Dialog dialog, final Binary binary) {
	final String binaryLabel = binary.getLabel();
	final String prefix = "The requested operation cannot be performed due to invalid '" + binaryLabel
			+ "' settings. Check your '" + binaryLabel
			+ "' configuration and preferences under the corresponding ";
	final String link = "preference page";
	final String suffix = ".";
	final String text = prefix + link + suffix;

	final Composite control = new Composite(parent, NONE);
	control.setLayout(GridLayoutFactory.fillDefaults().create());
	final GridData gridData = GridDataFactory.fillDefaults().align(LEFT, TOP).grab(true, true).create();
	control.setLayoutData(gridData);

	final StyleRange style = new StyleRange();
	style.underline = true;
	style.underlineStyle = UNDERLINE_LINK;

	final StyledText styledText = new StyledText(control, MULTI | READ_ONLY | WRAP);
	styledText.setWordWrap(true);
	styledText.setJustify(true);
	styledText.setText(text);
	final GridData textGridData = GridDataFactory.fillDefaults().align(FILL, FILL).grab(true, true).create();
	textGridData.widthHint = TEXT_WIDTH_HINT;
	textGridData.heightHint = TEXT_HEIGHT_HINT;
	styledText.setLayoutData(textGridData);

	styledText.setEditable(false);
	styledText.setBackground(UIUtils.getSystemColor(COLOR_WIDGET_BACKGROUND));
	final int[] ranges = { text.indexOf(link), link.length() };
	final StyleRange[] styles = { style };
	styledText.setStyleRanges(ranges, styles);

	styledText.addMouseListener(new MouseAdapter() {

		@Override
		public void mouseDown(final MouseEvent event) {
			try {
				final int offset = styledText.getOffsetAtPoint(new Point(event.x, event.y));
				final StyleRange actualStyle = offset >= 0 ? styledText.getStyleRangeAtOffset(offset) : null;
				if (null != actualStyle && actualStyle.underline
						&& UNDERLINE_LINK == actualStyle.underlineStyle) {

					dialog.close();
					final PreferenceDialog preferenceDialog = createPreferenceDialogOn(
							UIUtils.getShell(),
							BinariesPreferencePage.ID,
							FILTER_IDS,
							null);

					if (null != preferenceDialog) {
						preferenceDialog.open();
					}

				}
			} catch (final IllegalArgumentException e) {
				// We are not over the actual text.
			}
		}

	});

	return control;
}
 
Example 20
Source File: MergeScriptView.java    From MergeProcessor with Apache License 2.0 4 votes vote down vote up
/**
 * @param parent a widget which will be the parent of the new instance (cannot
 *               be null)
 * @param style  the style of widget to construct
 */
public MergeScriptView(Composite parent, int style) {
	super(parent, style);
	setLayout(new GridLayout(2, false));

	new Label(this, SWT.NONE).setText(Messages.MergeScriptDialog_Path);

	textMergeScriptPath = new Text(this, SWT.BORDER);
	textMergeScriptPath.setEditable(false);
	textMergeScriptPath.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));

	new Label(this, SWT.NONE).setText(Messages.MergeScriptDialog_Status);

	textStatus = new Text(this, SWT.BORDER);
	textStatus.setEditable(false);
	textStatus.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));

	new Label(this, SWT.NONE).setText(Messages.MergeScriptDialog_Date);

	textDate = new Text(this, SWT.BORDER);
	textDate.setEditable(false);
	textDate.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));

	new Label(this, SWT.NONE).setText(Messages.MergeScriptDialog_RevisionRange);

	textRevisionRange = new Text(this, SWT.BORDER);
	textRevisionRange.setEditable(false);
	textRevisionRange.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));

	new Label(this, SWT.NONE).setText(Messages.MergeScriptDialog_SourceBranch);

	textSourceBranch = new Text(this, SWT.BORDER);
	textSourceBranch.setEditable(false);
	textSourceBranch.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));

	Label label = new Label(this, SWT.NONE);
	label.setText(Messages.MergeScriptDialog_TargetBranch);

	textTargetBranch = new Text(this, SWT.NONE); // TODO Change To Combo back if target branch change works again
	textTargetBranch.setEditable(false);
	textTargetBranch.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));

	labelNeededFiles = new Label(this, SWT.NONE);
	labelNeededFiles.setLayoutData(new GridData(SWT.LEFT, SWT.TOP, false, false, 1, 1));
	labelNeededFiles.setText(Messages.MergeScriptDialog_NeededFiles);

	textNeededFiles = new Text(this, SWT.BORDER | SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL);
	textNeededFiles.setEditable(false);
	GridDataFactory.swtDefaults().align(SWT.FILL, SWT.CENTER).grab(true, false).hint(SWT.DEFAULT, 50)
			.applyTo(textNeededFiles);

	buttonShowChanges = new Button(this, SWT.NONE);
	buttonShowChanges.setLayoutData(new GridData(SWT.FILL, SWT.FILL, false, false, 2, 1));
	buttonShowChanges.setText(Messages.MergeScriptDialog_ShowChanges);

	final TabFolder tabFolder = new TabFolder(this, SWT.NONE);
	tabFolder.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 2, 1));

	final TabItem tabContent = new TabItem(tabFolder, SWT.NONE);
	tabContent.setText(Messages.MergeScriptView_tbtmNewItem_text);

	textContent = new StyledText(tabFolder, SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL);
	tabContent.setControl(textContent);
	textContent.setEditable(false);

	tabRenaming = new TabItem(tabFolder, SWT.NONE);
	tabRenaming.setText(Messages.MergeScriptView_tbtmNewItem_1_text);

	renamingView = new RenamingView(tabFolder, SWT.NONE);
	tabRenaming.setControl(renamingView);

	buttonClose = new Button(this, SWT.NONE);
	buttonClose.setLayoutData(new GridData(SWT.FILL, SWT.FILL, false, false, 2, 1));
	buttonClose.setText(Messages.MergeScriptDialog_Close);
}