@Override public void update ( final ViewerCell cell ) { final Map.Entry<?, ?> cfg = (Map.Entry<?, ?>)cell.getElement (); switch ( cell.getColumnIndex () ) { case 0: cell.setText ( "" + cfg.getKey () ); break; case 1: cell.setText ( "" + cfg.getValue () ); break; } super.update ( cell ); } }
@Override public void update(ViewerCell cell) { Object element = cell.getElement(); if (element instanceof Repository) { Repository repo = (Repository) element; String descr = ""; //$NON-NLS-1$ try { descr += " [" + repo.getBranch() + "]";//$NON-NLS-1$ //$NON-NLS-2$ } catch (IOException e) { Activator.logError(e.getMessage(), e); } Color decorationsColor = JFaceResources.getColorRegistry() .get(JFacePreferences.DECORATIONS_COLOR); String repoName = repo.getWorkTree().getName(); int repoNameLen = repoName.length(); StyleRange styleRange = new StyleRange(repoNameLen, repoNameLen + descr.length(), decorationsColor, null); cell.setImage(repositoryImage); cell.setText(repoName + descr); cell.setStyleRanges(new StyleRange[] { styleRange }); } super.update(cell); } });
@Override public void update(ViewerCell cell) { Object element = cell.getElement(); StyledString styledString = getStyledString(element); cell.setText(styledString.toString()); cell.setStyleRanges(styledString.getStyleRanges()); cell.setImage(getImage(element)); super.update(cell); }
@Override public void update(ViewerCell cell) { StyledString string = getStyledText(cell.getElement()); cell.setText(string.getString()); cell.setStyleRanges(string.getStyleRanges()); cell.setImage(getImage(cell.getElement())); super.update(cell); }
public void update(ViewerCell cell) { StyledString string = getStyledText(cell.getElement()); cell.setText(string.getString()); cell.setStyleRanges(string.getStyleRanges()); cell.setImage(getImage(cell.getElement())); super.update(cell); }
@Override public void update(ViewerCell cell) { StyledString string = getStyledText(cell.getElement()); cell.setText(string.getString()); cell.setStyleRanges(string.getStyleRanges()); cell.setImage(getImage(cell.getElement())); super.update(cell); }
@Override public void update(ViewerCell cell) { StyledString string = getStyledText(cell.getElement()); cell.setText(string.getString()); cell.setStyleRanges(string.getStyleRanges()); cell.setImage(getImage(cell.getElement())); super.update(cell); }
@Override public void update(ViewerCell cell) { final Object element = cell.getElement(); ITargetDefinition targetDef = (ITargetDefinition) element; ITargetHandle targetHandle = targetDef.getHandle(); String name = targetDef.getName(); if (name == null || name.length() == 0) { name = targetHandle.toString(); } StyledString styledString = new StyledString(name); if (targetHandle instanceof WorkspaceFileTargetHandle) { IFile file = ((WorkspaceFileTargetHandle) targetHandle).getTargetFile(); String location = " - " + file.getFullPath(); //$NON-NLS-1$ styledString.append(location, StyledString.DECORATIONS_STYLER); } else if (targetHandle instanceof ExternalFileTargetHandle) { URI uri = ((ExternalFileTargetHandle) targetHandle).getLocation(); String location = " - " + uri.toASCIIString(); //$NON-NLS-1$ styledString.append(location, StyledString.DECORATIONS_STYLER); } cell.setText(styledString.toString()); cell.setStyleRanges(styledString.getStyleRanges()); cell.setImage(getImage(targetDef)); super.update(cell); }
public void update(ViewerCell cell) { Object e = cell.getElement(); if( e instanceof YAMLOutlineElement ){ YAMLOutlineElement element = (YAMLOutlineElement) e; StyledString styledString = new StyledString( elementLabel(element), TEXT_STYLER ); boolean showTags = Activator.getDefault().getPreferenceStore().getBoolean(PreferenceConstants.OUTLINE_SHOW_TAGS ); if( showTags ){ styledString.append( " " + element.node.getTag(), TAG_STYLER ); } cell.setText(styledString.toString()); cell.setStyleRanges(styledString.getStyleRanges()); cell.setImage(getImage( element ) ); } super.update(cell); }
performResolve(targetDef); cell.setImage(getImage(targetDef)); super.update(cell);
@Override public void update(ViewerCell cell) { switch (cell.getColumnIndex()) { case COLUMN_FEATURE_NAME : StyledString label = getStyledText(cell.getElement()); cell.setStyleRanges(label.getStyleRanges()); cell.setText(label.toString()); cell.setImage(getColumnImage(cell.getElement(), COLUMN_FEATURE_NAME)); break; case COLUMN_PLUGIN_RESOLUTION : cell.setText(getColumnText(cell.getElement(), COLUMN_PLUGIN_RESOLUTION)); cell.setImage(getColumnImage(cell.getElement(), COLUMN_PLUGIN_RESOLUTION)); break; } super.update(cell); }
@Override public void update ( final ViewerCell cell ) { final ConfigurationDescriptor cfg = (ConfigurationDescriptor)cell.getElement (); switch ( cell.getColumnIndex () ) { case 0: cell.setText ( cfg.getConfigurationInformation ().getId () ); break; case 1: cell.setText ( "" + cfg.getConfigurationInformation ().getState () ); break; } if ( cfg.getConfigurationInformation ().getErrorInformation () != null ) { cell.setBackground ( Display.getCurrent ().getSystemColor ( SWT.COLOR_RED ) ); } else { cell.setBackground ( null ); } super.update ( cell ); }
@Override public void update(ViewerCell cell) { Object element = cell.getElement(); StyledString styledString = new StyledString(); if (element instanceof ImportPackageSpecification) { ImportPackageSpecification spec = (ImportPackageSpecification) element; styledString.append(spec.getName()); ExportPackageDescription supplier = (ExportPackageDescription) spec.getSupplier(); if (isJREPackage(supplier)) { styledString.append(PDEUIMessages.StateViewPage_suppliedByJRE); } else { styledString.append(PDEUIMessages.StateViewPage_suppliedBy); getElementString(supplier.getSupplier(), styledString, false); } } else { getElementString(element, styledString, true); } cell.setText(styledString.toString()); cell.setStyleRanges(styledString.getStyleRanges()); cell.setImage(getImage(element)); super.update(cell); }
@Override public void update(ViewerCell cell) { Object element = cell.getElement(); if (!(element instanceof ItemsListSeparator) && provider instanceof IStyledLabelProvider) { IStyledLabelProvider styledLabelProvider = (IStyledLabelProvider) provider; StyledString styledString = getStyledText(element, styledLabelProvider); cell.setText(styledString.getString()); cell.setStyleRanges(styledString.getStyleRanges()); cell.setImage(styledLabelProvider.getImage(element)); } else { cell.setText(getText(element)); cell.setImage(getImage(element)); } cell.setFont(getFont(element)); cell.setForeground(getForeground(element)); cell.setBackground(getBackground(element)); super.update(cell); }