|
Lines 133-146
Link Here
|
| 133 |
* </p> |
133 |
* </p> |
| 134 |
* <p> |
134 |
* <p> |
| 135 |
* This preference page has four general types of methods. Create methods are |
135 |
* This preference page has four general types of methods. Create methods are |
| 136 |
* called when the page is first made visisble. They are responsible for |
136 |
* called when the page is first made visible. They are responsible for creating |
| 137 |
* creating all of the widgets, and laying them out within the preference page. |
137 |
* all of the widgets, and laying them out within the preference page. Fill |
| 138 |
* Fill methods populate the contents of the widgets that contain collections of |
138 |
* methods populate the contents of the widgets that contain collections of data |
| 139 |
* data from which items can be selected. The select methods respond to |
139 |
* from which items can be selected. The select methods respond to selection |
| 140 |
* selection events from the user, such as a button press or a table selection. |
140 |
* events from the user, such as a button press or a table selection. The update |
| 141 |
* The update methods update the contents of various widgets based on the |
141 |
* methods update the contents of various widgets based on the current state of |
| 142 |
* current state of the user interface. For example, the command name label will |
142 |
* the user interface. For example, the command name label will always try to |
| 143 |
* always try to match the current select in the binding table. |
143 |
* match the current select in the binding table. |
| 144 |
* </p> |
144 |
* </p> |
| 145 |
* |
145 |
* |
| 146 |
* @since 3.2 |
146 |
* @since 3.2 |
|
Lines 603-608
Link Here
|
| 603 |
return null; |
603 |
return null; |
| 604 |
} |
604 |
} |
| 605 |
|
605 |
|
|
|
606 |
private boolean checkConflict(Binding binding) { |
| 607 |
Collection matches = (Collection) localChangeManager |
| 608 |
.getActiveBindingsDisregardingContext().get( |
| 609 |
binding.getTriggerSequence()); |
| 610 |
if (matches != null) { |
| 611 |
Iterator i = matches.iterator(); |
| 612 |
while (i.hasNext()) { |
| 613 |
Binding b = (Binding) i.next(); |
| 614 |
if (binding != b |
| 615 |
&& b.getContextId().equals(binding.getContextId())) { |
| 616 |
return true; |
| 617 |
} |
| 618 |
} |
| 619 |
} |
| 620 |
return false; |
| 621 |
} |
| 622 |
|
| 606 |
public final String getColumnText(final Object element, |
623 |
public final String getColumnText(final Object element, |
| 607 |
final int columnIndex) { |
624 |
final int columnIndex) { |
| 608 |
final Object value = element; |
625 |
final Object value = element; |
|
Lines 617-622
Link Here
|
| 617 |
return NewKeysPreferenceMessages.Undefined_Command; |
634 |
return NewKeysPreferenceMessages.Undefined_Command; |
| 618 |
} |
635 |
} |
| 619 |
case COLUMN_TRIGGER_SEQUENCE: |
636 |
case COLUMN_TRIGGER_SEQUENCE: |
|
|
637 |
if (checkConflict(binding)) { |
| 638 |
return "*" + binding.getTriggerSequence().format(); //$NON-NLS-1$ |
| 639 |
} |
| 620 |
return binding.getTriggerSequence().format(); |
640 |
return binding.getTriggerSequence().format(); |
| 621 |
|
641 |
|
| 622 |
case COLUMN_WHEN: |
642 |
case COLUMN_WHEN: |
|
Lines 701-706
Link Here
|
| 701 |
for (int i = 1; i < COLUMN_USER; i++) { |
721 |
for (int i = 1; i < COLUMN_USER; i++) { |
| 702 |
String text = getColumnText(element, i); |
722 |
String text = getColumnText(element, i); |
| 703 |
if (text != null) { |
723 |
if (text != null) { |
|
|
724 |
buf.append(' '); |
| 704 |
buf.append(text); |
725 |
buf.append(text); |
| 705 |
} |
726 |
} |
| 706 |
} |
727 |
} |