@Override public int hashCode() { return getId().hashCode(); }
@Override public int hashCode() { return getId().hashCode(); }
public int hashCode() { return getId().hashCode(); }
/** * Installs all text hovers. */ private void installTextHovers() { // initialize lists - indicates that the initialization happened fTextHoverSpecifications= new ArrayList<>(2); fInstantiatedTextHovers= new ArrayList<>(2); // populate list JavaEditorTextHoverDescriptor[] hoverDescs= JavaPlugin.getDefault().getJavaEditorTextHoverDescriptors(); for (int i= 0; i < hoverDescs.length; i++) { // ensure that we don't add ourselves to the list if (!PreferenceConstants.ID_BESTMATCH_HOVER.equals(hoverDescs[i].getId())) fTextHoverSpecifications.add(hoverDescs[i]); } }
/** * Installs all text hovers. */ private void installTextHovers() { // initialize lists - indicates that the initialization happened fTextHoverSpecifications= new ArrayList(2); fInstantiatedTextHovers= new ArrayList(2); // populate list JavaEditorTextHoverDescriptor[] hoverDescs= JavaPlugin.getDefault().getJavaEditorTextHoverDescriptors(); for (int i= 0; i < hoverDescs.length; i++) { // ensure that we don't add ourselves to the list if (!PreferenceConstants.ID_BESTMATCH_HOVER.equals(hoverDescs[i].getId())) fTextHoverSpecifications.add(hoverDescs[i]); } }
/** * Installs all text hovers. */ private void installTextHovers() { // initialize lists - indicates that the initialization happened fTextHoverSpecifications= new ArrayList<>(2); fInstantiatedTextHovers= new ArrayList<>(2); // populate list JavaEditorTextHoverDescriptor[] hoverDescs= JavaPlugin.getDefault().getJavaEditorTextHoverDescriptors(); for (int i= 0; i < hoverDescs.length; i++) { // ensure that we don't add ourselves to the list if (!PreferenceConstants.ID_BESTMATCH_HOVER.equals(hoverDescs[i].getId())) fTextHoverSpecifications.add(hoverDescs[i]); } }
@Override public void performOk() { StringBuffer buf= new StringBuffer(); StringBuffer maskBuf= new StringBuffer(); for (int i= 0; i < fHoverConfigs.length; i++) { buf.append(getContributedHovers()[i].getId()); buf.append(JavaEditorTextHoverDescriptor.VALUE_SEPARATOR); if (!fHoverConfigs[i].fIsEnabled) buf.append(JavaEditorTextHoverDescriptor.DISABLED_TAG); String modifier= fHoverConfigs[i].fModifierString; if (modifier == null || modifier.length() == 0) modifier= JavaEditorTextHoverDescriptor.NO_MODIFIER; buf.append(modifier); buf.append(JavaEditorTextHoverDescriptor.VALUE_SEPARATOR); maskBuf.append(getContributedHovers()[i].getId()); maskBuf.append(JavaEditorTextHoverDescriptor.VALUE_SEPARATOR); maskBuf.append(fHoverConfigs[i].fStateMask); maskBuf.append(JavaEditorTextHoverDescriptor.VALUE_SEPARATOR); } fStore.setValue(PreferenceConstants.EDITOR_TEXT_HOVER_MODIFIERS, buf.toString()); fStore.setValue(PreferenceConstants.EDITOR_TEXT_HOVER_MODIFIER_MASKS, maskBuf.toString()); JavaPlugin.getDefault().resetJavaEditorTextHoverDescriptors(); }
public void performOk() { StringBuffer buf= new StringBuffer(); StringBuffer maskBuf= new StringBuffer(); for (int i= 0; i < fHoverConfigs.length; i++) { buf.append(getContributedHovers()[i].getId()); buf.append(JavaEditorTextHoverDescriptor.VALUE_SEPARATOR); if (!fHoverConfigs[i].fIsEnabled) buf.append(JavaEditorTextHoverDescriptor.DISABLED_TAG); String modifier= fHoverConfigs[i].fModifierString; if (modifier == null || modifier.length() == 0) modifier= JavaEditorTextHoverDescriptor.NO_MODIFIER; buf.append(modifier); buf.append(JavaEditorTextHoverDescriptor.VALUE_SEPARATOR); maskBuf.append(getContributedHovers()[i].getId()); maskBuf.append(JavaEditorTextHoverDescriptor.VALUE_SEPARATOR); maskBuf.append(fHoverConfigs[i].fStateMask); maskBuf.append(JavaEditorTextHoverDescriptor.VALUE_SEPARATOR); } fStore.setValue(PreferenceConstants.EDITOR_TEXT_HOVER_MODIFIERS, buf.toString()); fStore.setValue(PreferenceConstants.EDITOR_TEXT_HOVER_MODIFIER_MASKS, maskBuf.toString()); JavaPlugin.getDefault().resetJavaEditorTextHoverDescriptors(); }
@Override public void performOk() { StringBuilder buf= new StringBuilder(); StringBuilder maskBuf= new StringBuilder(); for (int i= 0; i < fHoverConfigs.length; i++) { buf.append(getContributedHovers()[i].getId()); buf.append(JavaEditorTextHoverDescriptor.VALUE_SEPARATOR); if (!fHoverConfigs[i].fIsEnabled) buf.append(JavaEditorTextHoverDescriptor.DISABLED_TAG); String modifier= fHoverConfigs[i].fModifierString; if (modifier == null || modifier.length() == 0) modifier= JavaEditorTextHoverDescriptor.NO_MODIFIER; buf.append(modifier); buf.append(JavaEditorTextHoverDescriptor.VALUE_SEPARATOR); maskBuf.append(getContributedHovers()[i].getId()); maskBuf.append(JavaEditorTextHoverDescriptor.VALUE_SEPARATOR); maskBuf.append(fHoverConfigs[i].fStateMask); maskBuf.append(JavaEditorTextHoverDescriptor.VALUE_SEPARATOR); } fStore.setValue(PreferenceConstants.EDITOR_TEXT_HOVER_MODIFIERS, buf.toString()); fStore.setValue(PreferenceConstants.EDITOR_TEXT_HOVER_MODIFIER_MASKS, maskBuf.toString()); JavaPlugin.getDefault().resetJavaEditorTextHoverDescriptors(); }
String modifierString= idToModifier.get(getContributedHovers()[i].getId()); boolean enabled= true; if (modifierString == null) fHoverConfigs[i].fStateMask= Integer.parseInt(idToModifierMask.get(getContributedHovers()[i].getId())); } catch (NumberFormatException ex) { fHoverConfigs[i].fStateMask= -1;
if (PreferenceConstants.ID_BESTMATCH_HOVER.equals(fJavaEditorTextHoverDescriptors[i].getId())) { JavaEditorTextHoverDescriptor hoverDescriptor= fJavaEditorTextHoverDescriptors[i]; for (int j= i; j > 0; j--)
if (PreferenceConstants.ID_BESTMATCH_HOVER.equals(fJavaEditorTextHoverDescriptors[i].getId())) { JavaEditorTextHoverDescriptor hoverDescriptor= fJavaEditorTextHoverDescriptors[i]; for (int j= i; j > 0; j--)
if (PreferenceConstants.ID_BESTMATCH_HOVER.equals(fJavaEditorTextHoverDescriptors[i].getId())) { JavaEditorTextHoverDescriptor hoverDescriptor= fJavaEditorTextHoverDescriptors[i]; for (int j= i; j > 0; j--)
@Override public void checkStateChanged(CheckStateChangedEvent event) { String id= ((JavaEditorTextHoverDescriptor)event.getElement()).getId(); if (id == null) return; JavaEditorTextHoverDescriptor[] descriptors= getContributedHovers(); HoverConfig hoverConfig= null; int i= 0, length= fHoverConfigs.length; while (i < length) { if (id.equals(descriptors[i].getId())) { hoverConfig= fHoverConfigs[i]; hoverConfig.fIsEnabled= event.getChecked(); fModifierEditor.setEnabled(event.getChecked()); fHoverTableViewer.setSelection(new StructuredSelection(descriptors[i])); } i++; } handleHoverListSelection(); updateStatus(hoverConfig); } });
@Override public void checkStateChanged(CheckStateChangedEvent event) { String id= ((JavaEditorTextHoverDescriptor)event.getElement()).getId(); if (id == null) return; JavaEditorTextHoverDescriptor[] descriptors= getContributedHovers(); HoverConfig hoverConfig= null; int i= 0, length= fHoverConfigs.length; while (i < length) { if (id.equals(descriptors[i].getId())) { hoverConfig= fHoverConfigs[i]; hoverConfig.fIsEnabled= event.getChecked(); fModifierEditor.setEnabled(event.getChecked()); fHoverTableViewer.setSelection(new StructuredSelection(descriptors[i])); } i++; } handleHoverListSelection(); updateStatus(hoverConfig); } });
public void checkStateChanged(CheckStateChangedEvent event) { String id= ((JavaEditorTextHoverDescriptor)event.getElement()).getId(); if (id == null) return; JavaEditorTextHoverDescriptor[] descriptors= getContributedHovers(); HoverConfig hoverConfig= null; int i= 0, length= fHoverConfigs.length; while (i < length) { if (id.equals(descriptors[i].getId())) { hoverConfig= fHoverConfigs[i]; hoverConfig.fIsEnabled= event.getChecked(); fModifierEditor.setEnabled(event.getChecked()); fHoverTableViewer.setSelection(new StructuredSelection(descriptors[i])); } i++; } handleHoverListSelection(); updateStatus(hoverConfig); } });