org.eclipse.ui.views_3.6.100.v20120705-114010

16:48:29.221 INFO  jd.cli.Main - Decompiling org.eclipse.ui.views_3.6.100.v20120705-114010.jar
package org.eclipse.ui.internal.views;

import org.eclipse.core.runtime.Assert;
import org.eclipse.core.runtime.IAdaptable;
import org.eclipse.core.runtime.IAdapterManager;
import org.eclipse.core.runtime.Platform;
import org.eclipse.core.runtime.PlatformObject;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.ui.plugin.AbstractUIPlugin;

public final class ViewsPlugin
  extends AbstractUIPlugin
{
  public static final String PLUGIN_ID = "org.eclipse.ui.views";
  private static final String ICONS_PATH = "$nl$/icons/full/";
  private static ViewsPlugin instance;
  
  public static ViewsPlugin getDefault()
  {
    return instance;
  }
  
  public ViewsPlugin()
  {
    instance = this;
  }
  
  public static ImageDescriptor getViewImageDescriptor(String relativePath)
  {
    return imageDescriptorFromPlugin("org.eclipse.ui.views", "$nl$/icons/full/" + relativePath);
  }
  
  public static Object getAdapter(Object sourceObject, Class adapter, boolean activatePlugins)
  {
    Assert.isNotNull(adapter);
    if (sourceObject == null) {
      return null;
    }
    if (adapter.isInstance(sourceObject)) {
      return sourceObject;
    }
    if ((sourceObject instanceof IAdaptable))
    {
      IAdaptable adaptable = (IAdaptable)sourceObject;
      
      Object result = adaptable.getAdapter(adapter);
      if (result != null)
      {
        Assert.isTrue(adapter.isInstance(result));
        return result;
      }
    }
    if (!(sourceObject instanceof PlatformObject))
    {
      Object result;
      Object result;
      if (activatePlugins) {
        result = Platform.getAdapterManager().loadAdapter(sourceObject, adapter.getName());
      } else {
        result = Platform.getAdapterManager().getAdapter(sourceObject, adapter);
      }
      if (result != null) {
        return result;
      }
    }
    return null;
  }
}

/* Location:
 * Qualified Name:     org.eclipse.ui.internal.views.ViewsPlugin
 * Java Class Version: 1.2 (46.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.ui.internal.views.contentoutline;

import org.eclipse.osgi.util.NLS;

public class ContentOutlineMessages
  extends NLS
{
  private static final String BUNDLE_NAME = "org.eclipse.ui.internal.views.contentoutline.messages";
  public static String ContentOutline_noOutline;
  
  static
  {
    NLS.initializeMessages("org.eclipse.ui.internal.views.contentoutline.messages", ContentOutlineMessages.class);
  }
}

/* Location:
 * Qualified Name:     org.eclipse.ui.internal.views.contentoutline.ContentOutlineMessages
 * Java Class Version: 1.2 (46.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.ui.internal.views.properties;

import org.eclipse.osgi.util.NLS;

public class PropertiesMessages
  extends NLS
{
  private static final String BUNDLE_NAME = "org.eclipse.ui.internal.views.properties.messages";
  public static String Categories_text;
  public static String Categories_toolTip;
  public static String Columns_text;
  public static String Columns_toolTip;
  public static String CopyProperty_text;
  public static String Defaults_text;
  public static String Defaults_toolTip;
  public static String Filter_text;
  public static String Filter_toolTip;
  public static String Selection_description;
  public static String Pin_text;
  public static String Pin_toolTip;
  public static String PropertyViewer_property;
  public static String PropertyViewer_value;
  public static String PropertyViewer_misc;
  public static String CopyToClipboardProblemDialog_title;
  public static String CopyToClipboardProblemDialog_message;
  
  static
  {
    NLS.initializeMessages("org.eclipse.ui.internal.views.properties.messages", PropertiesMessages.class);
  }
}

/* Location:
 * Qualified Name:     org.eclipse.ui.internal.views.properties.PropertiesMessages
 * Java Class Version: 1.2 (46.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.ui.views.contentoutline;

import org.eclipse.ui.IWorkbenchPart;
import org.eclipse.ui.part.IContributedContentsView;

class ContentOutline$1
  implements IContributedContentsView
{
  final ContentOutline this$0;
  
  ContentOutline$1(ContentOutline paramContentOutline)
  {
    this$0 = paramContentOutline;
  }
  
  public IWorkbenchPart getContributingPart()
  {
    return ContentOutline.access$0(this$0);
  }
}

/* Location:
 * Qualified Name:     org.eclipse.ui.views.contentoutline.ContentOutline.1
 * Java Class Version: 1.2 (46.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.ui.views.contentoutline;

import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.ISelectionChangedListener;
import org.eclipse.jface.viewers.ISelectionProvider;
import org.eclipse.jface.viewers.SelectionChangedEvent;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.ui.IEditorPart;
import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.IWorkbenchPage;
import org.eclipse.ui.IWorkbenchPart;
import org.eclipse.ui.IWorkbenchPartSite;
import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.help.IWorkbenchHelpSystem;
import org.eclipse.ui.internal.views.ViewsPlugin;
import org.eclipse.ui.internal.views.contentoutline.ContentOutlineMessages;
import org.eclipse.ui.part.IContributedContentsView;
import org.eclipse.ui.part.IPage;
import org.eclipse.ui.part.IPageBookViewPage;
import org.eclipse.ui.part.IPageSite;
import org.eclipse.ui.part.MessagePage;
import org.eclipse.ui.part.PageBook;
import org.eclipse.ui.part.PageBookView;
import org.eclipse.ui.part.PageBookView.PageRec;
import org.eclipse.ui.part.PageBookView.SelectionProvider;

public class ContentOutline
  extends PageBookView
  implements ISelectionProvider, ISelectionChangedListener
{
  public static final String PREFIX = "org.eclipse.ui.";
  public static final String CONTENT_OUTLINE_VIEW_HELP_CONTEXT_ID = "org.eclipse.ui.content_outline_context";
  private String defaultText = ContentOutlineMessages.ContentOutline_noOutline;
  
  public void addSelectionChangedListener(ISelectionChangedListener listener)
  {
    getSelectionProvider().addSelectionChangedListener(listener);
  }
  
  protected IPage createDefaultPage(PageBook book)
  {
    MessagePage page = new MessagePage();
    initPage(page);
    page.createControl(book);
    page.setMessage(defaultText);
    return page;
  }
  
  public void createPartControl(Composite parent)
  {
    super.createPartControl(parent);
    PlatformUI.getWorkbench().getHelpSystem().setHelp(getPageBook(), 
      "org.eclipse.ui.content_outline_context");
  }
  
  protected PageBookView.PageRec doCreatePage(IWorkbenchPart part)
  {
    Object obj = ViewsPlugin.getAdapter(part, IContentOutlinePage.class, false);
    if ((obj instanceof IContentOutlinePage))
    {
      IContentOutlinePage page = (IContentOutlinePage)obj;
      if ((page instanceof IPageBookViewPage)) {
        initPage((IPageBookViewPage)page);
      }
      page.createControl(getPageBook());
      return new PageBookView.PageRec(part, page);
    }
    return null;
  }
  
  protected void doDestroyPage(IWorkbenchPart part, PageBookView.PageRec rec)
  {
    IContentOutlinePage page = (IContentOutlinePage)page;
    page.dispose();
    rec.dispose();
  }
  
  public Object getAdapter(Class key)
  {
    if (key == IContributedContentsView.class) {
      new IContributedContentsView()
      {
        public IWorkbenchPart getContributingPart()
        {
          return ContentOutline.this.getContributingEditor();
        }
      };
    }
    return super.getAdapter(key);
  }
  
  protected IWorkbenchPart getBootstrapPart()
  {
    IWorkbenchPage page = getSite().getPage();
    if (page != null) {
      return page.getActiveEditor();
    }
    return null;
  }
  
  private IWorkbenchPart getContributingEditor()
  {
    return getCurrentContributingPart();
  }
  
  public ISelection getSelection()
  {
    return getSelectionProvider().getSelection();
  }
  
  protected boolean isImportant(IWorkbenchPart part)
  {
    return part instanceof IEditorPart;
  }
  
  public void partBroughtToTop(IWorkbenchPart part)
  {
    partActivated(part);
  }
  
  public void removeSelectionChangedListener(ISelectionChangedListener listener)
  {
    getSelectionProvider().removeSelectionChangedListener(listener);
  }
  
  public void selectionChanged(SelectionChangedEvent event)
  {
    getSelectionProvider().selectionChanged(event);
  }
  
  public void setSelection(ISelection selection)
  {
    getSelectionProvider().setSelection(selection);
  }
  
  protected void showPageRec(PageBookView.PageRec pageRec)
  {
    IPageSite pageSite = getPageSite(page);
    ISelectionProvider provider = pageSite.getSelectionProvider();
    if ((provider == null) && ((page instanceof IContentOutlinePage))) {
      pageSite.setSelectionProvider((IContentOutlinePage)page);
    }
    super.showPageRec(pageRec);
  }
}

/* Location:
 * Qualified Name:     org.eclipse.ui.views.contentoutline.ContentOutline
 * Java Class Version: 1.2 (46.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.ui.views.contentoutline;

import org.eclipse.jface.util.SafeRunnable;
import org.eclipse.jface.viewers.ISelectionChangedListener;
import org.eclipse.jface.viewers.SelectionChangedEvent;

class ContentOutlinePage$1
  extends SafeRunnable
{
  final ContentOutlinePage this$0;
  private final ISelectionChangedListener val$l;
  private final SelectionChangedEvent val$event;
  
  ContentOutlinePage$1(ContentOutlinePage paramContentOutlinePage, ISelectionChangedListener paramISelectionChangedListener, SelectionChangedEvent paramSelectionChangedEvent)
  {
    this$0 = paramContentOutlinePage;val$l = paramISelectionChangedListener;val$event = paramSelectionChangedEvent;
  }
  
  public void run()
  {
    val$l.selectionChanged(val$event);
  }
}

/* Location:
 * Qualified Name:     org.eclipse.ui.views.contentoutline.ContentOutlinePage.1
 * Java Class Version: 1.2 (46.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.ui.views.contentoutline;

import org.eclipse.core.runtime.ListenerList;
import org.eclipse.core.runtime.SafeRunner;
import org.eclipse.jface.util.SafeRunnable;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.ISelectionChangedListener;
import org.eclipse.jface.viewers.SelectionChangedEvent;
import org.eclipse.jface.viewers.StructuredSelection;
import org.eclipse.jface.viewers.TreeViewer;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.ui.part.IPageSite;
import org.eclipse.ui.part.Page;

public abstract class ContentOutlinePage
  extends Page
  implements IContentOutlinePage, ISelectionChangedListener
{
  private ListenerList selectionChangedListeners = new ListenerList();
  private TreeViewer treeViewer;
  
  public void addSelectionChangedListener(ISelectionChangedListener listener)
  {
    selectionChangedListeners.add(listener);
  }
  
  public void createControl(Composite parent)
  {
    treeViewer = new TreeViewer(parent, getTreeStyle());
    treeViewer.addSelectionChangedListener(this);
  }
  
  protected int getTreeStyle()
  {
    return 770;
  }
  
  protected void fireSelectionChanged(ISelection selection)
  {
    SelectionChangedEvent event = new SelectionChangedEvent(this, 
      selection);
    
    Object[] listeners = selectionChangedListeners.getListeners();
    for (int i = 0; i < listeners.length; i++)
    {
      ISelectionChangedListener l = (ISelectionChangedListener)listeners[i];
      SafeRunner.run(new SafeRunnable()
      {
        private final ISelectionChangedListener val$l;
        private final SelectionChangedEvent val$event;
        
        public void run()
        {
          val$l.selectionChanged(val$event);
        }
      });
    }
  }
  
  public Control getControl()
  {
    if (treeViewer == null) {
      return null;
    }
    return treeViewer.getControl();
  }
  
  public ISelection getSelection()
  {
    if (treeViewer == null) {
      return StructuredSelection.EMPTY;
    }
    return treeViewer.getSelection();
  }
  
  protected TreeViewer getTreeViewer()
  {
    return treeViewer;
  }
  
  public void init(IPageSite pageSite)
  {
    super.init(pageSite);
    pageSite.setSelectionProvider(this);
  }
  
  public void removeSelectionChangedListener(ISelectionChangedListener listener)
  {
    selectionChangedListeners.remove(listener);
  }
  
  public void selectionChanged(SelectionChangedEvent event)
  {
    fireSelectionChanged(event.getSelection());
  }
  
  public void setFocus()
  {
    treeViewer.getControl().setFocus();
  }
  
  public void setSelection(ISelection selection)
  {
    if (treeViewer != null) {
      treeViewer.setSelection(selection);
    }
  }
}

/* Location:
 * Qualified Name:     org.eclipse.ui.views.contentoutline.ContentOutlinePage
 * Java Class Version: 1.2 (46.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.ui.views.contentoutline;

import org.eclipse.jface.viewers.ISelectionProvider;
import org.eclipse.ui.part.IPage;

public abstract interface IContentOutlinePage
  extends IPage, ISelectionProvider
{}

/* Location:
 * Qualified Name:     org.eclipse.ui.views.contentoutline.IContentOutlinePage
 * Java Class Version: 1.2 (46.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.ui.views.properties;

import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.help.IWorkbenchHelpSystem;

class CategoriesAction
  extends PropertySheetAction
{
  public CategoriesAction(PropertySheetViewer viewer, String name)
  {
    super(viewer, name);
    PlatformUI.getWorkbench().getHelpSystem()
      .setHelp(this, "org.eclipse.ui.properties_categories_action_context");
  }
  
  public void run()
  {
    PropertySheetViewer ps = getPropertySheet();
    ps.deactivateCellEditor();
    if (isChecked()) {
      ps.showCategories();
    } else {
      ps.hideCategories();
    }
  }
}

/* Location:
 * Qualified Name:     org.eclipse.ui.views.properties.CategoriesAction
 * Java Class Version: 1.2 (46.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.ui.views.properties;

import org.eclipse.jface.viewers.CellEditor;
import org.eclipse.jface.viewers.ColorCellEditor;
import org.eclipse.swt.widgets.Composite;

public class ColorPropertyDescriptor
  extends PropertyDescriptor
{
  public ColorPropertyDescriptor(Object id, String displayName)
  {
    super(id, displayName);
  }
  
  public CellEditor createPropertyEditor(Composite parent)
  {
    CellEditor editor = new ColorCellEditor(parent);
    if (getValidator() != null) {
      editor.setValidator(getValidator());
    }
    return editor;
  }
}

/* Location:
 * Qualified Name:     org.eclipse.ui.views.properties.ColorPropertyDescriptor
 * Java Class Version: 1.2 (46.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.ui.views.properties;

import org.eclipse.jface.viewers.LabelProvider;

public class ComboBoxLabelProvider
  extends LabelProvider
{
  private String[] values;
  
  public ComboBoxLabelProvider(String[] values)
  {
    this.values = values;
  }
  
  public String[] getValues()
  {
    return values;
  }
  
  public void setValues(String[] values)
  {
    this.values = values;
  }
  
  public String getText(Object element)
  {
    if (element == null) {
      return "";
    }
    if ((element instanceof Integer))
    {
      int index = ((Integer)element).intValue();
      if ((index >= 0) && (index < values.length)) {
        return values[index];
      }
      return "";
    }
    return "";
  }
}

/* Location:
 * Qualified Name:     org.eclipse.ui.views.properties.ComboBoxLabelProvider
 * Java Class Version: 1.2 (46.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.ui.views.properties;

import org.eclipse.jface.viewers.CellEditor;
import org.eclipse.jface.viewers.ComboBoxCellEditor;
import org.eclipse.jface.viewers.ILabelProvider;
import org.eclipse.swt.widgets.Composite;

public class ComboBoxPropertyDescriptor
  extends PropertyDescriptor
{
  private String[] labels;
  
  public ComboBoxPropertyDescriptor(Object id, String displayName, String[] labelsArray)
  {
    super(id, displayName);
    labels = labelsArray;
  }
  
  public CellEditor createPropertyEditor(Composite parent)
  {
    CellEditor editor = new ComboBoxCellEditor(parent, labels, 
      8);
    if (getValidator() != null) {
      editor.setValidator(getValidator());
    }
    return editor;
  }
  
  public ILabelProvider getLabelProvider()
  {
    if (isLabelProviderSet()) {
      return super.getLabelProvider();
    }
    return new ComboBoxLabelProvider(labels);
  }
}

/* Location:
 * Qualified Name:     org.eclipse.ui.views.properties.ComboBoxPropertyDescriptor
 * Java Class Version: 1.2 (46.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.ui.views.properties;

import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.swt.SWTError;
import org.eclipse.swt.dnd.Clipboard;
import org.eclipse.swt.dnd.TextTransfer;
import org.eclipse.swt.dnd.Transfer;
import org.eclipse.swt.widgets.Control;
import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.help.IWorkbenchHelpSystem;
import org.eclipse.ui.internal.views.properties.PropertiesMessages;

class CopyPropertyAction
  extends PropertySheetAction
{
  private Clipboard clipboard;
  
  public CopyPropertyAction(PropertySheetViewer viewer, String name, Clipboard clipboard)
  {
    super(viewer, name);
    PlatformUI.getWorkbench().getHelpSystem().setHelp(this, 
      "org.eclipse.ui.properties_copy_action_context");
    this.clipboard = clipboard;
  }
  
  public void run()
  {
    IStructuredSelection selection = (IStructuredSelection)getPropertySheet()
      .getSelection();
    if (selection.isEmpty()) {
      return;
    }
    IPropertySheetEntry entry = (IPropertySheetEntry)selection
      .getFirstElement();
    
    StringBuffer buffer = new StringBuffer();
    buffer.append(entry.getDisplayName());
    buffer.append("\t");
    buffer.append(entry.getValueAsString());
    
    setClipboard(buffer.toString());
  }
  
  public void selectionChanged(IStructuredSelection sel)
  {
    setEnabled(!sel.isEmpty());
  }
  
  private void setClipboard(String text)
  {
    try
    {
      Object[] data = { text };
      Transfer[] transferTypes = {
        TextTransfer.getInstance() };
      clipboard.setContents(data, transferTypes);
    }
    catch (SWTError e)
    {
      if (code != 2002) {
        throw e;
      }
      if (MessageDialog.openQuestion(getPropertySheet().getControl()
        .getShell(), PropertiesMessages.CopyToClipboardProblemDialog_title, 
        PropertiesMessages.CopyToClipboardProblemDialog_message)) {
        setClipboard(text);
      }
    }
  }
}

/* Location:
 * Qualified Name:     org.eclipse.ui.views.properties.CopyPropertyAction
 * Java Class Version: 1.2 (46.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.ui.views.properties;

import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.help.IWorkbenchHelpSystem;

class DefaultsAction
  extends PropertySheetAction
{
  public DefaultsAction(PropertySheetViewer viewer, String name)
  {
    super(viewer, name);
    PlatformUI.getWorkbench().getHelpSystem().setHelp(this, 
      "org.eclipse.ui.properties_defaults_action_context");
  }
  
  public void run()
  {
    getPropertySheet().deactivateCellEditor();
    getPropertySheet().resetProperties();
  }
}

/* Location:
 * Qualified Name:     org.eclipse.ui.views.properties.DefaultsAction
 * Java Class Version: 1.2 (46.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.ui.views.properties;

import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.help.IWorkbenchHelpSystem;

class FilterAction
  extends PropertySheetAction
{
  public FilterAction(PropertySheetViewer viewer, String name)
  {
    super(viewer, name);
    PlatformUI.getWorkbench().getHelpSystem().setHelp(this, 
      "org.eclipse.ui.properties_filter_action_context");
  }
  
  public void run()
  {
    PropertySheetViewer ps = getPropertySheet();
    ps.deactivateCellEditor();
    if (isChecked()) {
      ps.showExpert();
    } else {
      ps.hideExpert();
    }
  }
}

/* Location:
 * Qualified Name:     org.eclipse.ui.views.properties.FilterAction
 * Java Class Version: 1.2 (46.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.ui.views.properties;

import org.eclipse.jface.viewers.CellEditor;

abstract interface ICellEditorActivationListener
{
  public abstract void cellEditorActivated(CellEditor paramCellEditor);
  
  public abstract void cellEditorDeactivated(CellEditor paramCellEditor);
}

/* Location:
 * Qualified Name:     org.eclipse.ui.views.properties.ICellEditorActivationListener
 * Java Class Version: 1.2 (46.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.ui.views.properties;

abstract interface IPropertiesHelpContextIds
{
  public static final String PREFIX = "org.eclipse.ui.";
  public static final String CATEGORIES_ACTION = "org.eclipse.ui.properties_categories_action_context";
  public static final String DEFAULTS_ACTION = "org.eclipse.ui.properties_defaults_action_context";
  public static final String FILTER_ACTION = "org.eclipse.ui.properties_filter_action_context";
  public static final String COPY_PROPERTY_ACTION = "org.eclipse.ui.properties_copy_action_context";
  public static final String PIN_ACTION = "org.eclipse.ui.properties_pin_action_context";
  public static final String PROPERTY_SHEET_VIEW = "org.eclipse.ui.property_sheet_view_context";
}

/* Location:
 * Qualified Name:     org.eclipse.ui.views.properties.IPropertiesHelpContextIds
 * Java Class Version: 1.2 (46.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.ui.views.properties;

import org.eclipse.jface.viewers.CellEditor;
import org.eclipse.jface.viewers.ILabelProvider;
import org.eclipse.swt.widgets.Composite;

public abstract interface IPropertyDescriptor
{
  public abstract CellEditor createPropertyEditor(Composite paramComposite);
  
  public abstract String getCategory();
  
  public abstract String getDescription();
  
  public abstract String getDisplayName();
  
  public abstract String[] getFilterFlags();
  
  public abstract Object getHelpContextIds();
  
  public abstract Object getId();
  
  public abstract ILabelProvider getLabelProvider();
  
  public abstract boolean isCompatibleWith(IPropertyDescriptor paramIPropertyDescriptor);
}

/* Location:
 * Qualified Name:     org.eclipse.ui.views.properties.IPropertyDescriptor
 * Java Class Version: 1.2 (46.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.ui.views.properties;

import org.eclipse.jface.viewers.CellEditor;
import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.widgets.Composite;

public abstract interface IPropertySheetEntry
{
  public static final String FILTER_ID_EXPERT = "org.eclipse.ui.views.properties.expert";
  
  public abstract void addPropertySheetEntryListener(IPropertySheetEntryListener paramIPropertySheetEntryListener);
  
  public abstract void applyEditorValue();
  
  public abstract void dispose();
  
  public abstract String getCategory();
  
  public abstract IPropertySheetEntry[] getChildEntries();
  
  public abstract String getDescription();
  
  public abstract String getDisplayName();
  
  public abstract CellEditor getEditor(Composite paramComposite);
  
  public abstract String getErrorText();
  
  public abstract String[] getFilters();
  
  public abstract Object getHelpContextIds();
  
  public abstract Image getImage();
  
  public abstract String getValueAsString();
  
  public abstract boolean hasChildEntries();
  
  public abstract void removePropertySheetEntryListener(IPropertySheetEntryListener paramIPropertySheetEntryListener);
  
  public abstract void resetPropertyValue();
  
  public abstract void setValues(Object[] paramArrayOfObject);
}

/* Location:
 * Qualified Name:     org.eclipse.ui.views.properties.IPropertySheetEntry
 * Java Class Version: 1.2 (46.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.ui.views.properties;

public abstract interface IPropertySheetEntryListener
{
  public abstract void childEntriesChanged(IPropertySheetEntry paramIPropertySheetEntry);
  
  public abstract void errorMessageChanged(IPropertySheetEntry paramIPropertySheetEntry);
  
  public abstract void valueChanged(IPropertySheetEntry paramIPropertySheetEntry);
}

/* Location:
 * Qualified Name:     org.eclipse.ui.views.properties.IPropertySheetEntryListener
 * Java Class Version: 1.2 (46.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.ui.views.properties;

import org.eclipse.ui.ISelectionListener;
import org.eclipse.ui.part.IPage;

public abstract interface IPropertySheetPage
  extends IPage, ISelectionListener
{}

/* Location:
 * Qualified Name:     org.eclipse.ui.views.properties.IPropertySheetPage
 * Java Class Version: 1.2 (46.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.ui.views.properties;

public abstract interface IPropertySource
{
  public abstract Object getEditableValue();
  
  public abstract IPropertyDescriptor[] getPropertyDescriptors();
  
  public abstract Object getPropertyValue(Object paramObject);
  
  public abstract boolean isPropertySet(Object paramObject);
  
  public abstract void resetPropertyValue(Object paramObject);
  
  public abstract void setPropertyValue(Object paramObject1, Object paramObject2);
}

/* Location:
 * Qualified Name:     org.eclipse.ui.views.properties.IPropertySource
 * Java Class Version: 1.2 (46.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.ui.views.properties;

public abstract interface IPropertySource2
  extends IPropertySource
{
  public abstract boolean isPropertyResettable(Object paramObject);
  
  public abstract boolean isPropertySet(Object paramObject);
}

/* Location:
 * Qualified Name:     org.eclipse.ui.views.properties.IPropertySource2
 * Java Class Version: 1.2 (46.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.ui.views.properties;

public abstract interface IPropertySourceProvider
{
  public abstract IPropertySource getPropertySource(Object paramObject);
}

/* Location:
 * Qualified Name:     org.eclipse.ui.views.properties.IPropertySourceProvider
 * Java Class Version: 1.2 (46.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.ui.views.properties;

import org.eclipse.core.commands.AbstractHandler;
import org.eclipse.core.commands.ExecutionEvent;
import org.eclipse.core.commands.ExecutionException;
import org.eclipse.ui.IViewReference;
import org.eclipse.ui.IViewSite;
import org.eclipse.ui.IWorkbenchPage;
import org.eclipse.ui.IWorkbenchPart;
import org.eclipse.ui.IWorkbenchPartSite;
import org.eclipse.ui.PartInitException;
import org.eclipse.ui.handlers.HandlerUtil;
import org.eclipse.ui.part.IShowInSource;
import org.eclipse.ui.part.ShowInContext;

public class NewPropertySheetHandler
  extends AbstractHandler
{
  public static final String ID = "org.eclipse.ui.views.properties.NewPropertySheetCommand";
  private static final boolean PIN_NEW_PROPERTY_VIEW = Boolean.valueOf(System.getProperty("org.eclipse.ui.views.properties.pinNewPV", Boolean.FALSE.toString())).booleanValue();
  
  public Object execute(ExecutionEvent event)
    throws ExecutionException
  {
    IWorkbenchPart activePart = HandlerUtil.getActivePartChecked(event);
    
    PropertyShowInContext context = getShowInContext(event);
    try
    {
      PropertySheet sheet = findPropertySheet(event, context);
      sheet.show(context);
      if ((activePart instanceof PropertySheet))
      {
        PropertySheet parent = (PropertySheet)activePart;
        parent.setPinned(true);
      }
      else if (!sheet.isPinned())
      {
        sheet.setPinned(PIN_NEW_PROPERTY_VIEW);
      }
    }
    catch (PartInitException e)
    {
      throw new ExecutionException("Part could not be initialized", e);
    }
    return null;
  }
  
  protected PropertyShowInContext getShowInContext(ExecutionEvent event)
    throws ExecutionException
  {
    IWorkbenchPart activePart = HandlerUtil.getActivePartChecked(event);
    if ((activePart instanceof PropertySheet))
    {
      PropertySheet sheet = (PropertySheet)activePart;
      return (PropertyShowInContext)sheet.getShowInContext();
    }
    IShowInSource adapter = (IShowInSource)activePart
      .getAdapter(IShowInSource.class);
    if (adapter != null)
    {
      ShowInContext showInContext = adapter.getShowInContext();
      return new PropertyShowInContext(activePart, showInContext);
    }
    return new PropertyShowInContext(activePart, 
      HandlerUtil.getShowInSelection(event));
  }
  
  protected PropertySheet findPropertySheet(ExecutionEvent event, PropertyShowInContext context)
    throws PartInitException, ExecutionException
  {
    IWorkbenchPage page = HandlerUtil.getActivePartChecked(event).getSite()
      .getPage();
    String secondaryId = null;
    if ((HandlerUtil.getActivePart(event) instanceof PropertySheet))
    {
      secondaryId = Long.toString(System.currentTimeMillis());
    }
    else
    {
      IViewReference[] refs = page.getViewReferences();
      for (int i = 0; i < refs.length; i++)
      {
        IViewReference viewReference = refs[i];
        if ("org.eclipse.ui.views.PropertySheet".equals(viewReference.getId()))
        {
          secondaryId = Long.toString(System.currentTimeMillis());
          PropertySheet sheet = (PropertySheet)viewReference
            .getView(true);
          if ((!sheet.isPinned()) || (
            (sheet.isPinned()) && 
            (sheet.getShowInContext().equals(context))))
          {
            secondaryId = sheet.getViewSite().getSecondaryId();
            break;
          }
        }
      }
    }
    return (PropertySheet)page.showView("org.eclipse.ui.views.PropertySheet", 
      secondaryId, 1);
  }
}

/* Location:
 * Qualified Name:     org.eclipse.ui.views.properties.NewPropertySheetHandler
 * Java Class Version: 1.2 (46.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.ui.views.properties;

import org.eclipse.jface.action.Action;
import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.help.IWorkbenchHelpSystem;
import org.eclipse.ui.internal.WorkbenchImages;
import org.eclipse.ui.internal.views.properties.PropertiesMessages;

public class PinPropertySheetAction
  extends Action
{
  public PinPropertySheetAction()
  {
    super(PropertiesMessages.Pin_text, 2);
    
    setId(PinPropertySheetAction.class.getName() + 
      "#" + Long.toString(System.currentTimeMillis()));
    setToolTipText(PropertiesMessages.Pin_toolTip);
    setImageDescriptor(
      WorkbenchImages.getImageDescriptor("IMG_ETOOL_PIN_EDITOR"));
    setDisabledImageDescriptor(
      WorkbenchImages.getImageDescriptor("IMG_ETOOL_PIN_EDITOR_DISABLED"));
    
    PlatformUI.getWorkbench().getHelpSystem().setHelp(this, 
      "org.eclipse.ui.properties_pin_action_context");
  }
}

/* Location:
 * Qualified Name:     org.eclipse.ui.views.properties.PinPropertySheetAction
 * Java Class Version: 1.2 (46.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.ui.views.properties;

import org.eclipse.jface.viewers.ColumnLabelProvider;
import org.eclipse.jface.viewers.ILabelProvider;
import org.eclipse.swt.graphics.Image;

public class PropertyColumnLabelProvider
  extends ColumnLabelProvider
{
  protected IPropertySourceProvider propertySourceProvider;
  protected Object propertyID;
  
  public PropertyColumnLabelProvider(IPropertySourceProvider propertySourceProvider, Object propertyID)
  {
    this.propertySourceProvider = propertySourceProvider;
    this.propertyID = propertyID;
  }
  
  public String getText(Object object)
  {
    IPropertySource propertySource = propertySourceProvider
      .getPropertySource(object);
    IPropertyDescriptor[] propertyDescriptors = propertySource
      .getPropertyDescriptors();
    for (int i = 0; i < propertyDescriptors.length; i++)
    {
      IPropertyDescriptor propertyDescriptor = propertyDescriptors[i];
      if (propertyID.equals(propertyDescriptor.getId())) {
        return propertyDescriptor.getLabelProvider().getText(
          propertySource.getPropertyValue(propertyID));
      }
    }
    return "";
  }
  
  public Image getImage(Object object)
  {
    IPropertySource propertySource = propertySourceProvider
      .getPropertySource(object);
    IPropertyDescriptor[] propertyDescriptors = propertySource
      .getPropertyDescriptors();
    for (int i = 0; i < propertyDescriptors.length; i++)
    {
      IPropertyDescriptor propertyDescriptor = propertyDescriptors[i];
      if (propertyID.equals(propertyDescriptor.getId())) {
        return propertyDescriptor.getLabelProvider().getImage(
          propertySource.getPropertyValue(propertyID));
      }
    }
    return null;
  }
}

/* Location:
 * Qualified Name:     org.eclipse.ui.views.properties.PropertyColumnLabelProvider
 * Java Class Version: 1.2 (46.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.ui.views.properties;

import org.eclipse.core.runtime.Assert;
import org.eclipse.jface.viewers.CellEditor;
import org.eclipse.jface.viewers.ICellEditorValidator;
import org.eclipse.jface.viewers.ILabelProvider;
import org.eclipse.jface.viewers.LabelProvider;
import org.eclipse.swt.widgets.Composite;

public class PropertyDescriptor
  implements IPropertyDescriptor
{
  private Object id;
  private String display;
  private String category = null;
  private String description = null;
  private Object helpIds;
  private String[] filterFlags;
  private ILabelProvider labelProvider = null;
  private ICellEditorValidator validator;
  private boolean incompatible = false;
  
  public PropertyDescriptor(Object id, String displayName)
  {
    Assert.isNotNull(id);
    Assert.isNotNull(displayName);
    this.id = id;
    display = displayName;
  }
  
  public CellEditor createPropertyEditor(Composite parent)
  {
    return null;
  }
  
  protected boolean getAlwaysIncompatible()
  {
    return incompatible;
  }
  
  public String getCategory()
  {
    return category;
  }
  
  public String getDescription()
  {
    return description;
  }
  
  public String getDisplayName()
  {
    return display;
  }
  
  public String[] getFilterFlags()
  {
    return filterFlags;
  }
  
  public Object getHelpContextIds()
  {
    return helpIds;
  }
  
  public Object getId()
  {
    return id;
  }
  
  public ILabelProvider getLabelProvider()
  {
    if (labelProvider != null) {
      return labelProvider;
    }
    return new LabelProvider();
  }
  
  protected ICellEditorValidator getValidator()
  {
    return validator;
  }
  
  public boolean isLabelProviderSet()
  {
    return labelProvider != null;
  }
  
  public boolean isCompatibleWith(IPropertyDescriptor anotherProperty)
  {
    if (getAlwaysIncompatible()) {
      return false;
    }
    Object id1 = getId();
    Object id2 = anotherProperty.getId();
    if (!id1.equals(id2)) {
      return false;
    }
    if (getCategory() == null)
    {
      if (anotherProperty.getCategory() != null) {
        return false;
      }
    }
    else if (!getCategory().equals(anotherProperty.getCategory())) {
      return false;
    }
    return true;
  }
  
  public void setAlwaysIncompatible(boolean flag)
  {
    incompatible = flag;
  }
  
  public void setCategory(String category)
  {
    this.category = category;
  }
  
  public void setDescription(String description)
  {
    this.description = description;
  }
  
  public void setFilterFlags(String[] value)
  {
    filterFlags = value;
  }
  
  public void setHelpContextIds(Object contextIds)
  {
    helpIds = contextIds;
  }
  
  public void setLabelProvider(ILabelProvider provider)
  {
    labelProvider = provider;
  }
  
  public void setValidator(ICellEditorValidator validator)
  {
    this.validator = validator;
  }
}

/* Location:
 * Qualified Name:     org.eclipse.ui.views.properties.PropertyDescriptor
 * Java Class Version: 1.2 (46.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.ui.views.properties;

import org.eclipse.jface.viewers.CellEditor;
import org.eclipse.jface.viewers.ColumnViewer;
import org.eclipse.jface.viewers.EditingSupport;
import org.eclipse.swt.widgets.Composite;

public class PropertyEditingSupport
  extends EditingSupport
{
  protected IPropertySourceProvider propertySourceProvider;
  protected Object propertyID;
  
  public PropertyEditingSupport(ColumnViewer viewer, IPropertySourceProvider propertySourceProvider, Object propertyID)
  {
    super(viewer);
    this.propertySourceProvider = propertySourceProvider;
    this.propertyID = propertyID;
  }
  
  protected boolean canEdit(Object object)
  {
    IPropertySource propertySource = propertySourceProvider
      .getPropertySource(object);
    IPropertyDescriptor[] propertyDescriptors = propertySource
      .getPropertyDescriptors();
    for (int i = 0; i < propertyDescriptors.length; i++)
    {
      IPropertyDescriptor propertyDescriptor = propertyDescriptors[i];
      if (propertyID.equals(propertyDescriptor.getId())) {
        return true;
      }
    }
    return false;
  }
  
  protected CellEditor getCellEditor(Object object)
  {
    IPropertySource propertySource = propertySourceProvider
      .getPropertySource(object);
    IPropertyDescriptor[] propertyDescriptors = propertySource
      .getPropertyDescriptors();
    for (int i = 0; i < propertyDescriptors.length; i++)
    {
      IPropertyDescriptor propertyDescriptor = propertyDescriptors[i];
      if (propertyID.equals(propertyDescriptor.getId())) {
        return 
          propertyDescriptor.createPropertyEditor((Composite)getViewer()
          .getControl());
      }
    }
    return null;
  }
  
  protected Object getValue(Object object)
  {
    IPropertySource propertySource = propertySourceProvider
      .getPropertySource(object);
    Object value = propertySource.getPropertyValue(propertyID);
    IPropertySource valuePropertySource = propertySourceProvider
      .getPropertySource(value);
    if (valuePropertySource != null) {
      value = valuePropertySource.getEditableValue();
    }
    return value;
  }
  
  protected void setValue(Object object, Object value)
  {
    IPropertySource propertySource = propertySourceProvider
      .getPropertySource(object);
    propertySource.setPropertyValue(propertyID, value);
  }
}

/* Location:
 * Qualified Name:     org.eclipse.ui.views.properties.PropertyEditingSupport
 * Java Class Version: 1.2 (46.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.ui.views.properties;

import org.eclipse.jface.util.IPropertyChangeListener;
import org.eclipse.jface.util.PropertyChangeEvent;

class PropertySheet$1
  implements IPropertyChangeListener
{
  final PropertySheet this$0;
  
  PropertySheet$1(PropertySheet paramPropertySheet)
  {
    this$0 = paramPropertySheet;
  }
  
  public void propertyChange(PropertyChangeEvent event)
  {
    if ("checked".equals(event.getProperty())) {
      PropertySheet.access$0(this$0);
    }
  }
}

/* Location:
 * Qualified Name:     org.eclipse.ui.views.properties.PropertySheet.1
 * Java Class Version: 1.2 (46.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.ui.views.properties;

import java.util.HashSet;
import org.eclipse.core.runtime.IConfigurationElement;
import org.eclipse.core.runtime.IExtension;
import org.eclipse.core.runtime.IExtensionPoint;
import org.eclipse.core.runtime.IExtensionRegistry;
import org.eclipse.core.runtime.IRegistryEventListener;
import org.eclipse.core.runtime.RegistryFactory;
import org.eclipse.jface.action.IAction;
import org.eclipse.jface.action.IMenuManager;
import org.eclipse.jface.action.IToolBarManager;
import org.eclipse.jface.action.Separator;
import org.eclipse.jface.util.IPropertyChangeListener;
import org.eclipse.jface.util.PropertyChangeEvent;
import org.eclipse.jface.viewers.ISelection;
import org.ec
1 2 3 4

Further reading...

For more information on Java 1.5 Tiger, you may find Java 1.5 Tiger, A developer's Notebook by D. Flanagan and B. McLaughlin from O'Reilly of interest.

New!JAR listings


Copyright 2006-2019. Infinite Loop Ltd