Skip to content

Commit

Permalink
[577198] Cleaned FB error marker figure and shown text
Browse files Browse the repository at this point in the history
Bug: https://bugs.eclipse.org/bugs/show_bug.cgi?id=577198
Change-Id: Ib044d0f9a17f3fb0eb1358953870e405052eb8ae
  • Loading branch information
azoitl committed Nov 12, 2021
1 parent db37043 commit f8c3160
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,10 @@ public final class Messages extends NLS {

public static String CutEditPartsAction_Text;

public static String ErrorMarkerFBNEditPart_ErrorMarker;

public static String ErrorMarkerFBNEditPart_OldType;

/** The FB edit part_ erro r_ unsupported fb type. */
public static String FBEditPart_ERROR_UnsupportedFBType;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,10 @@
*******************************************************************************/
package org.eclipse.fordiac.ide.application.editparts;

import java.text.MessageFormat;

import org.eclipse.draw2d.IFigure;
import org.eclipse.fordiac.ide.application.Messages;
import org.eclipse.fordiac.ide.application.figures.ErrorMarkerFBNeworkElementFigure;
import org.eclipse.fordiac.ide.model.libraryElement.ErrorMarkerFBNElement;
import org.eclipse.fordiac.ide.model.libraryElement.FBType;
Expand Down Expand Up @@ -43,17 +46,12 @@ private void updateErrorText() {
if (getModel().getPaletteEntry() != null) {
final FBType type = (FBType) getModel().getPaletteEntry().getType();
if (type != null) {
errorText.append("old type: " + type.getName()); //$NON-NLS-1$
errorText.append(System.lineSeparator());
errorText.append(MessageFormat.format(Messages.ErrorMarkerFBNEditPart_OldType, type.getName()));
}
}

if (getModel().getErrorMessage() != null) {
errorText.append(getModel().getErrorMessage());
}

if (errorText.length() == 0) {
errorText.append("Error Marker"); //$NON-NLS-1$
errorText.append(Messages.ErrorMarkerFBNEditPart_ErrorMarker);
}

setText(errorText.toString());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ CopyEditPartsAction_Text=Copy
CreateConnectionSection_CreateConnection=Create Connection
CreateSubAppCommand_LABELCreateSubAppCommand=Create SubApplication Command
CutEditPartsAction_Text=Cut
ErrorMarkerFBNEditPart_ErrorMarker=Error Marker
ErrorMarkerFBNEditPart_OldType=Old type: {0}
FBNetworkElementTooltipFigure_VersionLabel= / Version:
FBPaletteViewer_SearchForType=Search for Type
FBPaletteViewer_SelectConnectionEnd=Select Connection End
Expand Down

0 comments on commit f8c3160

Please sign in to comment.