summary |
shortlog |
log |
commit | commitdiff |
review |
tree
raw |
patch |
inline | side by side (from parent 1:
f6ac6d8)
gitlab #112
Change-Id: Ifebee86babe1a869e9dec1bffe4efaa47aa454d5
updateInsertPosition(PositionType.NEXT);
}
});
updateInsertPosition(PositionType.NEXT);
}
});
+
+ if (!hasInsertPosition()) {
+ label.setVisible(false);
+ buttonComposite.setVisible(false);
+ }
label = new Label(composite, SWT.NONE);
label.setText("Name");
label = new Label(composite, SWT.NONE);
label.setText("Name");
+ private boolean hasInsertPosition() {
+ return component.getNext() == null || component.getPrevious() == null;
+ }
+
private void updateInsertPosition(PositionType type) {
if (insertPosition == type)
return;
private void updateInsertPosition(PositionType type) {
if (insertPosition == type)
return;
lenghtAdjustable = ((selected.getType() == Type.INLINE)
&& (selected.isVariable() || selected.isModifiable()));
lenghtAdjustable = ((selected.getType() == Type.INLINE)
&& (selected.isVariable() || selected.isModifiable()));
- if (component.getNext() != null && component.getPrevious() != null) {
+ if (!hasInsertPosition()) {
// We are inserting to a fully connected variable length component
// only allow insertion within the component
startButton.setEnabled(false);
// We are inserting to a fully connected variable length component
// only allow insertion within the component
startButton.setEnabled(false);