org.eclipse.jst.jsf.facesconfig.ui_1.2.2.v201103292152

d);
          section.getSection().setExpanded(true);
        }
        IStructuredSelection newselection = new StructuredSelection(
          component);
        section.getStructuredViewer().setSelection(newselection);
      }
    }
  }
}

/* Location:
 * Qualified Name:     org.eclipse.jst.jsf.facesconfig.ui.page.ComponentsPage
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.jst.jsf.facesconfig.ui.page;

import java.util.List;
import org.eclipse.emf.edit.domain.AdapterFactoryEditingDomain;
import org.eclipse.emf.edit.ui.view.ExtendedPropertySheetPage;
import org.eclipse.ui.IActionBars;

class FacesConfigMasterDetailPage$1
  extends ExtendedPropertySheetPage
{
  FacesConfigMasterDetailPage$1(FacesConfigMasterDetailPage paramFacesConfigMasterDetailPage, AdapterFactoryEditingDomain $anonymous0)
  {
    super($anonymous0);
  }
  
  public void setSelectionToViewer(List selection) {}
  
  public void setActionBars(IActionBars actionBars)
  {
    super.setActionBars(actionBars);
  }
}

/* Location:
 * Qualified Name:     org.eclipse.jst.jsf.facesconfig.ui.page.FacesConfigMasterDetailPage.1
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.jst.jsf.facesconfig.ui.page;

import java.util.ArrayList;
import java.util.List;
import org.eclipse.emf.common.notify.AdapterFactory;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.edit.domain.AdapterFactoryEditingDomain;
import org.eclipse.emf.edit.domain.EditingDomain;
import org.eclipse.emf.edit.domain.IEditingDomainProvider;
import org.eclipse.emf.edit.ui.provider.AdapterFactoryContentProvider;
import org.eclipse.emf.edit.ui.view.ExtendedPropertySheetPage;
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.jface.viewers.StructuredSelection;
import org.eclipse.jst.jsf.facesconfig.ui.EditorPlugin;
import org.eclipse.jst.jsf.facesconfig.ui.FacesConfigEditor;
import org.eclipse.jst.jsf.facesconfig.ui.page.detail.FacesConfigDetailsPage;
import org.eclipse.jst.jsf.facesconfig.ui.section.FacesConfigMasterSection;
import org.eclipse.swt.custom.SashForm;
import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.ui.IActionBars;
import org.eclipse.ui.IWorkbenchPartSite;
import org.eclipse.ui.forms.DetailsPart;
import org.eclipse.ui.forms.IDetailsPage;
import org.eclipse.ui.forms.IDetailsPageProvider;
import org.eclipse.ui.forms.IManagedForm;
import org.eclipse.ui.forms.editor.FormEditor;
import org.eclipse.ui.forms.editor.FormPage;
import org.eclipse.ui.forms.widgets.FormToolkit;
import org.eclipse.ui.forms.widgets.ScrolledForm;
import org.eclipse.ui.forms.widgets.Section;
import org.eclipse.ui.views.properties.IPropertySheetPage;

public abstract class FacesConfigMasterDetailPage
  extends FormPage
  implements IFacesConfigPage, IDetailsPageProvider, ISelectionChangedListener, ISelectionProvider, IEditingDomainProvider
{
  private static final String BANNER_IMAGE_FILE = "form_banner.gif";
  private static final Image BANNER_IMAGE = EditorPlugin.getDefault()
    .getImage("form_banner.gif");
  private FacesConfigMasterSection[] facesConfigMasterSections;
  private DetailsPart detailsPart;
  private Object input;
  private List selectionChangedListeners = new ArrayList();
  private IPropertySheetPage propertySheetPage;
  private ISelection currentSelection = null;
  
  public FacesConfigMasterDetailPage(FacesConfigEditor editor, String id, String title)
  {
    super(editor, id, title);
  }
  
  public void dispose()
  {
    for (int i = 0; i < facesConfigMasterSections.length; i++)
    {
      FacesConfigMasterSection master = facesConfigMasterSections[i];
      if (master != null) {
        master.dispose();
      }
    }
    selectionChangedListeners.clear();
    
    super.dispose();
  }
  
  public EditingDomain getEditingDomain()
  {
    return ((FacesConfigEditor)getEditor()).getEditingDomain();
  }
  
  protected void createFormContent(IManagedForm managedForm)
  {
    ScrolledForm form = managedForm.getForm();
    form.setText(getTitle());
    form.setBackgroundImage(BANNER_IMAGE);
    fillBody(managedForm, managedForm.getToolkit());
    managedForm.refresh();
  }
  
  public void setActive(boolean active)
  {
    super.setActive(active);
    if (active) {
      if (getInput() != ((FacesConfigEditor)getEditor())
        .getFacesConfig()) {
        setInput(((FacesConfigEditor)getEditor()).getFacesConfig());
      } else {
        refresh();
      }
    }
  }
  
  public boolean isEditor()
  {
    return true;
  }
  
  private void fillBody(IManagedForm managedForm, FormToolkit toolkit)
  {
    Composite body = managedForm.getForm().getBody();
    
    GridLayout gridLayout = new GridLayout();
    horizontalSpacing = 0;
    verticalSpacing = 0;
    numColumns = 2;
    marginHeight = 0;
    marginWidth = 0;
    body.setLayout(gridLayout);
    
    SashForm sashForm = new SashForm(body, 0);
    managedForm.getToolkit().adapt(sashForm, false, false);
    sashForm.setMenu(body.getMenu());
    sashForm.setLayoutData(new GridData(1808));
    
    Composite leftContainer = toolkit.createComposite(sashForm);
    GridLayout gl = new GridLayout();
    marginHeight = 0;
    leftContainer.setLayout(gl);
    
    facesConfigMasterSections = createMasterSections(leftContainer, 
      managedForm, toolkit, this);
    if (facesConfigMasterSections != null)
    {
      int i = 0;
      for (int n = facesConfigMasterSections.length; i < n; i++)
      {
        FacesConfigMasterSection aSection = facesConfigMasterSections[i];
        aSection.initialize();
        aSection.addSelectionChangedListener(this);
      }
    }
    detailsPart = new DetailsPart(managedForm, sashForm, 0);
    managedForm.addPart(detailsPart);
    
    detailsPart.setPageLimit(4);
    detailsPart.setPageProvider(this);
    
    detailsPart.initialize(managedForm);
    
    sashForm.setWeights(new int[] { 40, 60 });
    
    getSite().setSelectionProvider(this);
  }
  
  protected abstract FacesConfigMasterSection[] createMasterSections(Composite paramComposite, IManagedForm paramIManagedForm, FormToolkit paramFormToolkit, FacesConfigMasterDetailPage paramFacesConfigMasterDetailPage);
  
  public void setInput(Object input)
  {
    if (facesConfigMasterSections != null)
    {
      int i = 0;
      for (int n = facesConfigMasterSections.length; i < n; i++) {
        facesConfigMasterSections[i].setInput(input);
      }
    }
    this.input = input;
  }
  
  public Object getInput()
  {
    return input;
  }
  
  public Object getPageKey(Object object)
  {
    if ((object instanceof EObject))
    {
      EObject eObject = (EObject)object;
      return eObject.eClass();
    }
    return null;
  }
  
  public abstract IDetailsPage getPage(Object paramObject);
  
  public void selectionChanged(SelectionChangedEvent event)
  {
    currentSelection = event.getSelection();
    if ((event.getSource() instanceof FacesConfigMasterSection))
    {
      FacesConfigMasterSection source = (FacesConfigMasterSection)event
        .getSource();
      
      detailsPart.selectionChanged(source, event.getSelection());
      if (source.getSection().isExpanded())
      {
        int i = 0;
        for (int n = selectionChangedListeners.size(); i < n; i++) {
          ((ISelectionChangedListener)selectionChangedListeners.get(i)).selectionChanged(event);
        }
      }
    }
    else if ((event.getSource() instanceof FacesConfigDetailsPage))
    {
      int i = 0;
      for (int n = selectionChangedListeners.size(); i < n; i++) {
        ((ISelectionChangedListener)selectionChangedListeners.get(i)).selectionChanged(event);
      }
    }
  }
  
  public void closeOtherSections(FacesConfigMasterSection section)
  {
    int i = 0;
    for (int n = facesConfigMasterSections.length; i < n; i++)
    {
      FacesConfigMasterSection aSection = facesConfigMasterSections[i];
      if ((aSection != section) && (aSection.getSection().isExpanded()))
      {
        aSection.getSection().setExpanded(false);
        GridData gd = new GridData(768);
        aSection.getSection().setLayoutData(gd);
      }
    }
  }
  
  public void refresh()
  {
    int i = 0;
    for (int n = facesConfigMasterSections.length; i < n; i++) {
      if (facesConfigMasterSections[i].getSection().isExpanded()) {
        facesConfigMasterSections[i].refresh();
      }
    }
    if (detailsPart.getCurrentPage() != null) {
      detailsPart.getCurrentPage().refresh();
    }
  }
  
  protected FacesConfigMasterSection getActiveSection()
  {
    int i = 0;
    for (int n = facesConfigMasterSections.length; i < n; i++) {
      if (facesConfigMasterSections[i].getSection().isExpanded()) {
        return facesConfigMasterSections[i];
      }
    }
    return null;
  }
  
  public void addSelectionChangedListener(ISelectionChangedListener listener)
  {
    selectionChangedListeners.add(listener);
  }
  
  public ISelection getSelection()
  {
    if (currentSelection != null) {
      return currentSelection;
    }
    return StructuredSelection.EMPTY;
  }
  
  public void removeSelectionChangedListener(ISelectionChangedListener listener)
  {
    selectionChangedListeners.remove(listener);
  }
  
  public void setSelection(ISelection selection) {}
  
  public Object getAdapter(Class adapter)
  {
    if (adapter == IPropertySheetPage.class) {
      return getPropertySheetPage();
    }
    return super.getAdapter(adapter);
  }
  
  private IPropertySheetPage getPropertySheetPage()
  {
    AdapterFactoryEditingDomain editingDomain = (AdapterFactoryEditingDomain)getEditor()
      .getAdapter(EditingDomain.class);
    AdapterFactory adapterFactory = (AdapterFactory)getEditor()
      .getAdapter(AdapterFactory.class);
    if (propertySheetPage == null)
    {
      propertySheetPage = new ExtendedPropertySheetPage(editingDomain)
      {
        public void setSelectionToViewer(List selection) {}
        
        public void setActionBars(IActionBars actionBars)
        {
          super.setActionBars(actionBars);
        }
      };((ExtendedPropertySheetPage)propertySheetPage)
        .setPropertySourceProvider(new AdapterFactoryContentProvider(
        adapterFactory));
    }
    return propertySheetPage;
  }
  
  public FacesConfigMasterSection[] getFacesConfigMasterSections()
  {
    return facesConfigMasterSections;
  }
}

/* Location:
 * Qualified Name:     org.eclipse.jst.jsf.facesconfig.ui.page.FacesConfigMasterDetailPage
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.jst.jsf.facesconfig.ui.page;

import org.eclipse.ui.forms.editor.IFormPage;

public abstract interface IFacesConfigPage
  extends IFormPage
{
  public abstract void setInput(Object paramObject);
  
  public abstract Object getInput();
  
  public abstract void refresh();
}

/* Location:
 * Qualified Name:     org.eclipse.jst.jsf.facesconfig.ui.page.IFacesConfigPage
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.jst.jsf.facesconfig.ui.page;

import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.jst.jsf.facesconfig.ui.EditorPlugin;
import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.widgets.Button;

class IntroductionPage$1
  extends SelectionAdapter
{
  IntroductionPage$1(IntroductionPage paramIntroductionPage) {}
  
  public void widgetSelected(SelectionEvent e)
  {
    boolean selection = ((Button)widget).getSelection();
    EditorPlugin.getDefault().getPreferenceStore().setValue("ShowIntroEditor", !selection);
  }
}

/* Location:
 * Qualified Name:     org.eclipse.jst.jsf.facesconfig.ui.page.IntroductionPage.1
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.jst.jsf.facesconfig.ui.page;

import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.jface.util.IPropertyChangeListener;
import org.eclipse.jface.util.PropertyChangeEvent;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.ISelectionChangedListener;
import org.eclipse.jface.viewers.ISelectionProvider;
import org.eclipse.jface.viewers.StructuredSelection;
import org.eclipse.jst.jsf.common.ui.internal.guiutils.IntroductionSection;
import org.eclipse.jst.jsf.facesconfig.ui.EditorMessages;
import org.eclipse.jst.jsf.facesconfig.ui.EditorPlugin;
import org.eclipse.jst.jsf.facesconfig.ui.FacesConfigEditor;
import org.eclipse.jst.jsf.facesconfig.ui.preference.GEMPreferences;
import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.ui.IWorkbenchPartSite;
import org.eclipse.ui.forms.IManagedForm;
import org.eclipse.ui.forms.editor.FormEditor;
import org.eclipse.ui.forms.editor.FormPage;
import org.eclipse.ui.forms.widgets.FormToolkit;
import org.eclipse.ui.forms.widgets.ScrolledForm;
import org.eclipse.ui.forms.widgets.TableWrapData;
import org.eclipse.ui.forms.widgets.TableWrapLayout;

public class IntroductionPage
  extends FormPage
  implements IFacesConfigPage, ISelectionProvider, IPropertyChangeListener
{
  private static final String FORM_BANNER_IMAGE_FILE = "form_banner.gif";
  private Button noIntroPageButton = null;
  
  public IntroductionPage(FacesConfigEditor facesConfigEditor)
  {
    super(facesConfigEditor, IntroductionPage.class.getName(), EditorMessages.editor_pageflow_page_intro_name);
  }
  
  protected void createFormContent(IManagedForm managedForm)
  {
    ScrolledForm form = managedForm.getForm();
    FormToolkit toolkit = getEditor().getToolkit();
    form.setText(EditorMessages.editor_pageflow_page_intro_title);
    
    form.setBackgroundImage(EditorPlugin.getDefault().getImage("form_banner.gif"));
    
    TableWrapLayout layout = new TableWrapLayout();
    numColumns = 1;
    makeColumnsEqualWidth = true;
    verticalSpacing = 20;
    form.getBody().setLayout(layout);
    
    IntroductionSection introPart = new IntroductionSection(
      "org.eclipse.jst.jsf.facesconfig.ui.FacesConfigEditor", managedForm, toolkit, 
      EditorMessages.editor_pageflow_page_intro_help_HelpContextID, 
      EditorMessages.editor_pageflow_page_intro_help_HelpToolTip);
    
    noIntroPageButton = toolkit.createButton(form.getBody(), EditorMessages.editor_pageflow_page_intro_NoIntroPage, 32);
    noIntroPageButton.addSelectionListener(new SelectionAdapter()
    {
      public void widgetSelected(SelectionEvent e)
      {
        boolean selection = ((Button)widget).getSelection();
        EditorPlugin.getDefault().getPreferenceStore().setValue("ShowIntroEditor", !selection);
      }
    });
    TableWrapData td = new TableWrapData(256);
    colspan = 1;
    introPart.setLayoutData(td);
    
    getSite().setSelectionProvider(this);
    
    IPreferenceStore preferenceStore = EditorPlugin.getDefault().getPreferenceStore();
    preferenceStore.addPropertyChangeListener(this);
    updatePrefenceControls(preferenceStore);
  }
  
  public void addSelectionChangedListener(ISelectionChangedListener listener) {}
  
  public boolean isEditor()
  {
    return true;
  }
  
  public ISelection getSelection()
  {
    return StructuredSelection.EMPTY;
  }
  
  public void removeSelectionChangedListener(ISelectionChangedListener listener) {}
  
  public void setSelection(ISelection selection) {}
  
  public Object getInput()
  {
    return null;
  }
  
  public void refresh() {}
  
  public void setInput(Object input) {}
  
  public void propertyChange(PropertyChangeEvent event)
  {
    if (event != null)
    {
      String property = event.getProperty();
      if ((property == null) || (property.equals("ShowIntroEditor"))) {
        updatePrefenceControls(EditorPlugin.getDefault().getPreferenceStore());
      }
    }
  }
  
  private void updatePrefenceControls(IPreferenceStore preferenceStore)
  {
    boolean noIntroPage = !GEMPreferences.getShowIntroEditor();
    noIntroPageButton.setSelection(noIntroPage);
  }
  
  public void dispose()
  {
    EditorPlugin.getDefault().getPreferenceStore().removePropertyChangeListener(this);
    super.dispose();
  }
}

/* Location:
 * Qualified Name:     org.eclipse.jst.jsf.facesconfig.ui.page.IntroductionPage
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.jst.jsf.facesconfig.ui.page;

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

class ManagedBeanPage$1
  implements ISelectionChangedListener
{
  ManagedBeanPage$1(ManagedBeanPage paramManagedBeanPage) {}
  
  public void selectionChanged(SelectionChangedEvent event)
  {
    this$0.setSelection(event.getSelection());
  }
}

/* Location:
 * Qualified Name:     org.eclipse.jst.jsf.facesconfig.ui.page.ManagedBeanPage.1
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.jst.jsf.facesconfig.ui.page;

import org.eclipse.emf.ecore.EClass;
import org.eclipse.jface.viewers.Viewer;
import org.eclipse.jface.viewers.ViewerFilter;
import org.eclipse.jst.jsf.facesconfig.emf.FacesConfigPackage;

class ManagedBeanPage$1ManagedBeanContentOutlinePage$1
  extends ViewerFilter
{
  ManagedBeanPage$1ManagedBeanContentOutlinePage$1(ManagedBeanPage.1ManagedBeanContentOutlinePage param1ManagedBeanContentOutlinePage) {}
  
  public boolean select(Viewer viewer, Object parentElement, Object element)
  {
    if (!FacesConfigPackage.eINSTANCE.getManagedBeanType().isInstance(element)) {
      if (!FacesConfigPackage.eINSTANCE.getManagedPropertyType().isInstance(element)) {
        return false;
      }
    }
    return 
    
      true;
  }
}

/* Location:
 * Qualified Name:     org.eclipse.jst.jsf.facesconfig.ui.page.ManagedBeanPage.1ManagedBeanContentOutlinePage.1
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.jst.jsf.facesconfig.ui.page;

import org.eclipse.emf.common.notify.AdapterFactory;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.edit.ui.provider.AdapterFactoryContentProvider;
import org.eclipse.emf.edit.ui.provider.AdapterFactoryLabelProvider;
import org.eclipse.jface.viewers.TreeViewer;
import org.eclipse.jface.viewers.Viewer;
import org.eclipse.jface.viewers.ViewerFilter;
import org.eclipse.jface.viewers.ViewerSorter;
import org.eclipse.jst.jsf.facesconfig.emf.FacesConfigPackage;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.ui.forms.editor.FormEditor;
import org.eclipse.ui.views.contentoutline.ContentOutlinePage;

class ManagedBeanPage$1ManagedBeanContentOutlinePage
  extends ContentOutlinePage
{
  ManagedBeanPage$1ManagedBeanContentOutlinePage(ManagedBeanPage paramManagedBeanPage) {}
  
  public void createControl(Composite parent)
  {
    super.createControl(parent);
    TreeViewer contentOutlineViewer = getTreeViewer();
    contentOutlineViewer.addSelectionChangedListener(this);
    
    AdapterFactory adapterFactory = (AdapterFactory)this$0.getEditor()
      .getAdapter(AdapterFactory.class);
    
    contentOutlineViewer
      .setContentProvider(new AdapterFactoryContentProvider(
      adapterFactory));
    contentOutlineViewer
      .setLabelProvider(new AdapterFactoryLabelProvider(
      adapterFactory));
    contentOutlineViewer.addFilter(new ViewerFilter()
    {
      public boolean select(Viewer viewer, Object parentElement, Object element)
      {
        if (!FacesConfigPackage.eINSTANCE.getManagedBeanType().isInstance(element)) {
          if (!FacesConfigPackage.eINSTANCE.getManagedPropertyType().isInstance(element)) {
            return false;
          }
        }
        return 
        
          true;
      }
    });
    contentOutlineViewer.setSorter(new ViewerSorter());
    contentOutlineViewer.setInput(this$0.getInput());
  }
}

/* Location:
 * Qualified Name:     org.eclipse.jst.jsf.facesconfig.ui.page.ManagedBeanPage.1ManagedBeanContentOutlinePage
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.jst.jsf.facesconfig.ui.page;

import org.eclipse.emf.common.notify.AdapterFactory;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.edit.ui.provider.AdapterFactoryContentProvider;
import org.eclipse.emf.edit.ui.provider.AdapterFactoryLabelProvider;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.ISelectionChangedListener;
import org.eclipse.jface.viewers.ISelectionProvider;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.jface.viewers.SelectionChangedEvent;
import org.eclipse.jface.viewers.StructuredSelection;
import org.eclipse.jface.viewers.StructuredViewer;
import org.eclipse.jface.viewers.TreeViewer;
import org.eclipse.jface.viewers.Viewer;
import org.eclipse.jface.viewers.ViewerFilter;
import org.eclipse.jface.viewers.ViewerSorter;
import org.eclipse.jst.jsf.facesconfig.emf.FacesConfigPackage;
import org.eclipse.jst.jsf.facesconfig.emf.ManagedBeanType;
import org.eclipse.jst.jsf.facesconfig.emf.ManagedPropertyType;
import org.eclipse.jst.jsf.facesconfig.ui.EditorMessages;
import org.eclipse.jst.jsf.facesconfig.ui.FacesConfigEditor;
import org.eclipse.jst.jsf.facesconfig.ui.page.detail.ManagedBeanDetailsPage;
import org.eclipse.jst.jsf.facesconfig.ui.section.FacesConfigMasterSection;
import org.eclipse.jst.jsf.facesconfig.ui.section.ManagedBeanMasterSection;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.ui.forms.IDetailsPage;
import org.eclipse.ui.forms.IManagedForm;
import org.eclipse.ui.forms.editor.FormEditor;
import org.eclipse.ui.forms.widgets.FormToolkit;
import org.eclipse.ui.forms.widgets.Section;
import org.eclipse.ui.views.contentoutline.ContentOutlinePage;
import org.eclipse.ui.views.contentoutline.IContentOutlinePage;

public class ManagedBeanPage
  extends FacesConfigMasterDetailPage
{
  public static final String PAGE_ID = "org.eclipse.jst.jsf.facesconfig.ui.page.ManagedBeanPage";
  private IContentOutlinePage contentOutlinePage;
  
  public ManagedBeanPage(FacesConfigEditor editor)
  {
    super(editor, "ManagedBeanPage", EditorMessages.FacesConfigEditor_ManagedBeans_TabName);
  }
  
  public void dispose()
  {
    if (contentOutlinePage != null)
    {
      contentOutlinePage.dispose();
      contentOutlinePage = null;
    }
    super.dispose();
  }
  
  protected FacesConfigMasterSection[] createMasterSections(Composite composite, IManagedForm managedForm, FormToolkit toolkit, FacesConfigMasterDetailPage page)
  {
    FacesConfigMasterSection managedBeanMaster = new ManagedBeanMasterSection(
      composite, managedForm, toolkit, page);
    managedBeanMaster.getSection().setExpanded(true);
    GridData gd = new GridData(1808);
    managedBeanMaster.getSection().setLayoutData(gd);
    return new FacesConfigMasterSection[] { managedBeanMaster };
  }
  
  public IDetailsPage getPage(Object key)
  {
    IDetailsPage detailsPage = null;
    if ((key instanceof EClass))
    {
      EClass eClass = (EClass)key;
      if (eClass.getClassifierID() == 63) {
        detailsPage = new ManagedBeanDetailsPage(this);
      }
      if ((detailsPage instanceof ISelectionProvider)) {
        ((ISelectionProvider)detailsPage).addSelectionChangedListener(this);
      }
    }
    return detailsPage;
  }
  
  public Object getAdapter(Class adapter)
  {
    if (adapter == IContentOutlinePage.class) {
      return getOutlinePage();
    }
    return super.getAdapter(adapter);
  }
  
  private IContentOutlinePage getOutlinePage()
  {
    if (contentOutlinePage == null)
    {
      contentOutlinePage = new ContentOutlinePage()
      {
        public void createControl(Composite parent)
        {
          super.createControl(parent);
          TreeViewer contentOutlineViewer = getTreeViewer();
          contentOutlineViewer.addSelectionChangedListener(this);
          
          AdapterFactory adapterFactory = (AdapterFactory)getEditor()
            .getAdapter(AdapterFactory.class);
          
          contentOutlineViewer
            .setContentProvider(new AdapterFactoryContentProvider(
            adapterFactory));
          contentOutlineViewer
            .setLabelProvider(new AdapterFactoryLabelProvider(
            adapterFactory));
          contentOutlineViewer.addFilter(new ViewerFilter()
          {
            public boolean select(Viewer viewer, Object parentElement, Object element)
            {
              if (!FacesConfigPackage.eINSTANCE.getManagedBeanType().isInstance(element)) {
                if (!FacesConfigPackage.eINSTANCE.getManagedPropertyType().isInstance(element)) {
                  return false;
                }
              }
              return 
              
                true;
            }
          });
          contentOutlineViewer.setSorter(new ViewerSorter());
          contentOutlineViewer.setInput(getInput());
        }
      };contentOutlinePage
        .addSelectionChangedListener(new ISelectionChangedListener()
        {
          public void selectionChanged(SelectionChangedEvent event)
          {
            setSelection(event.getSelection());
          }
        });
    }
    return contentOutlinePage;
  }
  
  public void setSelection(ISelection selection)
  {
    if ((selection instanceof IStructuredSelection))
    {
      IStructuredSelection ss = (IStructuredSelection)selection;
      ManagedBeanType bean = null;
      if ((ss.getFirstElement() instanceof ManagedBeanType)) {
        bean = (ManagedBeanType)ss.getFirstElement();
      } else if ((ss.getFirstElement() instanceof ManagedPropertyType)) {
        bean = (ManagedBeanType)((ManagedPropertyType)ss
          .getFirstElement()).eContainer();
      }
      if (bean != null)
      {
        if (!getManagedBeanMasterSection().getSection().isExpanded())
        {
          GridData gd = new GridData(1808);
          getManagedBeanMasterSection().getSection()
            .setLayoutData(gd);
          getManagedBeanMasterSection().getSection()
            .setExpanded(true);
        }
        IStructuredSelection newselection = new StructuredSelection(
          bean);
        getManagedBeanMasterSection().getStructuredViewer()
          .setSelection(newselection);
      }
    }
  }
  
  private ManagedBeanMasterSection getManagedBeanMasterSection()
  {
    return (ManagedBeanMasterSection)getFacesConfigMasterSections()[0];
  }
}

/* Location:
 * Qualified Name:     org.eclipse.jst.jsf.facesconfig.ui.page.ManagedBeanPage
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.jst.jsf.facesconfig.ui.page;

import java.util.List;
import org.eclipse.emf.edit.domain.AdapterFactoryEditingDomain;
import org.eclipse.emf.edit.ui.view.ExtendedPropertySheetPage;
import org.eclipse.ui.IActionBars;

class OthersPage$1
  extends ExtendedPropertySheetPage
{
  OthersPage$1(OthersPage paramOthersPage, AdapterFactoryEditingDomain $anonymous0)
  {
    super($anonymous0);
  }
  
  public void setSelectionToViewer(List selection) {}
  
  public void setActionBars(IActionBars actionBars)
  {
    super.setActionBars(actionBars);
  }
}

/* Location:
 * Qualified Name:     org.eclipse.jst.jsf.facesconfig.ui.page.OthersPage.1
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.jst.jsf.facesconfig.ui.page;

import org.eclipse.emf.ecore.EClass;
import org.eclipse.jface.viewers.Viewer;
import org.eclipse.jface.viewers.ViewerFilter;
import org.eclipse.jst.jsf.facesconfig.emf.FacesConfigPackage;

class OthersPage$1OthersContentOutlinePage$1
  extends ViewerFilter
{
  OthersPage$1OthersContentOutlinePage$1(OthersPage.1OthersContentOutlinePage param1OthersContentOutlinePage) {}
  
  public boolean select(Viewer viewer, Object parentElement, Object element)
  {
    if (!FacesConfigPackage.eINSTANCE.getApplicationType().isInstance(element)) {
      if (!FacesConfigPackage.eINSTANCE.getFactoryType().isInstance(
        element)) {
        if (!FacesConfigPackage.eINSTANCE.getLifecycleType().isInstance(
          element)) {
          if (!FacesConfigPackage.eINSTANCE.getActionListenerType().isInstance(element)) {
            if (!FacesConfigPackage.eINSTANCE.getDefaultRenderKitIdType().isInstance(element)) {
              if (!FacesConfigPackage.eINSTANCE.getLocaleConfigType().isInstance(
                element)) {
                if (!FacesConfigPackage.eINSTANCE.getDefaultLocaleType().isInstance(
                  element)) {
                  if (!FacesConfigPackage.eINSTANCE.getSupportedLocaleType().isInstance(element)) {
                    if (!FacesConfigPackage.eINSTANCE.getMessageBundleType().isInstance(
                      element)) {
                      if (!FacesConfigPackage.eINSTANCE.getNavigationHandlerType().isInstance(element)) {
                        if (!FacesConfigPackage.eINSTANCE.getPropertyResolverType().isInstance(element)) {
                          if (!FacesConfigPackage.eINSTANCE.getStateManagerType().isInstance(
                            element)) {
                            if (!FacesConfigPackage.eINSTANCE.getVariableResolverType().isInstance(element)) {
                              if (!FacesConfigPackage.eINSTANCE.getViewHandlerType().isInstance(
                                element)) {
                                if (!FacesConfigPackage.eINSTANCE.getApplicationFactoryType().isInstance(element)) {
                                  if (!FacesConfigPackage.eINSTANCE.getFacesContextFactoryType().isInstance(element)) {
                                    if (!FacesConfigPackage.eINSTANCE.getLifecycleFactoryType().isInstance(element)) {
                                      if (!FacesConfigPackage.eINSTANCE.getRenderKitFactoryType().isInstance(element)) {
                                        if (!FacesConfigPackage.eINSTANCE.getPhaseListenerType().isInstance(
                                          element)) {
                                          return false;
                                        }
                                      }
                                    }
                                  }
                                }
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
    return 
    
      true;
  }
}

/* Location:
 * Qualified Name:     org.eclipse.jst.jsf.facesconfig.ui.page.OthersPage.1OthersContentOutlinePage.1
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.jst.jsf.facesconfig.ui.page;

import org.eclipse.emf.common.notify.AdapterFactory;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.edit.ui.provider.AdapterFactoryContentProvider;
import org.eclipse.emf.edit.ui.provider.AdapterFactoryLabelProvider;
import org.eclipse.jface.viewers.TreeViewer;
import org.eclipse.jface.viewers.Viewer;
import org.eclipse.jface.viewers.ViewerFilter;
import org.eclipse.jface.viewers.ViewerSorter;
import org.eclipse.jst.jsf.facesconfig.emf.FacesConfigPackage;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.ui.forms.editor.FormEditor;
import org.eclipse.ui.views.contentoutline.ContentOutlinePage;

class OthersPage$1OthersContentOutlinePage
  extends ContentOutlinePage
{
  OthersPage$1OthersContentOutlinePage(OthersPage paramOthersPage) {}
  
  public void createControl(Composite parent)
  {
    super.createControl(parent);
    TreeViewer contentOutlineViewer = getTreeViewer();
    contentOutlineViewer.addSelectionChangedListener(this);
    
    AdapterFactory adapterFactory = (AdapterFactory)this$0.getEditor()
      .getAdapter(AdapterFactory.class);
    
    contentOutlineViewer
      .setContentProvider(new AdapterFactoryContentProvider(
      adapterFactory));
    contentOutlineViewer
      .setLabelProvider(new AdapterFactoryLabelProvider(
      adapterFactory));
    contentOutlineViewer.addFilter(new ViewerFilter()
    {
      public boolean select(Viewer viewer, Object parentElement, Object element)
      {
        if (!FacesConfigPackage.eINSTANCE.getApplicationType().isInstance(element)) {
          if (!FacesConfigPackage.eINSTANCE.getFactoryType().isInstance(
            element)) {
            if (!FacesConfigPackage.eINSTANCE.getLifecycleType().isInstance(
              element)) {
              if (!FacesConfigPackage.eINSTANCE.getActionListenerType().isInstance(element)) {
                if (!FacesConfigPackage.eINSTANCE.getDefaultRenderKitIdType().isInstance(element)) {
                  if (!FacesConfigPackage.eINSTANCE.getLocaleConfigType().isInstance(
                    element)) {
                    if (!FacesConfigPackage.eINSTANCE.getDefaultLocaleType().isInstance(
                      element)) {
                      if (!FacesConfigPackage.eINSTANCE.getSupportedLocaleType().isInstance(element)) {
                        if (!FacesConfigPackage.eINSTANCE.getMessageBundleType().isInstance(
                          element)) {
                          if (!FacesConfigPackage.eINSTANCE.getNavigationHandlerType().isInstance(element)) {
                            if (!FacesConfigPackage.eINSTANCE.getPropertyResolverType().isInstance(element)) {
                              if (!FacesConfigPackage.eINSTANCE.getStateManagerType().isInstance(
                                element)) {
                                if (!FacesConfigPackage.eINSTANCE.getVariableResolverType().isInstance(element)) {
                                  if (!FacesConfigPackage.eINSTANCE.getViewHandlerType().isInstance(
                                    element)) {
                                    if (!FacesConfigPackage.eINSTANCE.getApplicationFactoryType().isInstance(element)) {
                                      if (!FacesConfigPackage.eINSTANCE.getFacesContextFactoryType().isInstance(element)) {
                                        if (!FacesConfigPackage.eINSTANCE.getLifecycleFactoryType().isInstance(element)) {
                                          if (!FacesConfigPackage.eINSTANCE.getRenderKitFactoryType().isInstance(element)) {
                                            if (!FacesConfigPackage.eINSTANCE.getPhaseListenerType().isInstance(
                                              element)) {
                                              return false;
                                            }
                                          }
                                        }
                                      }
                                    }
                                  }
                                }
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
        return 
        
          true;
      }
    });
    contentOutlineViewer.setSorter(new ViewerSorter());
    contentOutlineViewer.setInput(this$0.getInput());
  }
}

/* Location:
 * Qualified Name:     org.eclipse.jst.jsf.facesconfig.ui.page.OthersPage.1OthersContentOutlinePage
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.jst.jsf.facesconfig.ui.page;

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

class OthersPage$2
  implements ISelectionChangedListener
{
  OthersPage$2(OthersPage paramOthersPage) {}
  
  public void selectionChanged(SelectionChangedEvent event)
  {
    this$0.setSelection(event.getSelection());
  }
}

/* Location:
 * Qualified Name:     org.eclipse.jst.jsf.facesconfig.ui.page.OthersPage.2
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.jst.jsf.facesconfig.ui.page;

import org.eclipse.emf.ecore.EObject;
import org.eclipse.jst.jsf.facesconfig.ui.section.OthersPageBaseSection;

class OthersPage$3
  implements Runnable
{
  OthersPage$3(OthersPage paramOthersPage, OthersPageBaseSection paramOthersPageBaseSection, EObject paramEObject) {}
  
  public void run()
  {
    OthersPage.access$0(this$0, val$baseSection, val$object);
  }
}

/* Location:
 * Qualified Name:     org.eclipse.jst.jsf.facesconfig.ui.page.OthersPage.3
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.jst.jsf.facesconfig.ui.page;

class OthersPage$FacesConfigOthersAdapter$1
  implements Runnable
{
  OthersPage$FacesConfigOthersAdapter$1(OthersPage.FacesConfigOthersAdapter paramFacesConfigOthersAdapter) {}
  
  public void run()
  {
    OthersPage.FacesConfigOthersAdapter.access$0(this$1).resetApplicationInput();
  }
}

/* Location:
 * Qualified Name:     org.eclipse.jst.jsf.facesconfig.ui.page.OthersPage.FacesConfigOthersAdapter.1
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.jst.jsf.facesconfig.ui.page;

class OthersPage$FacesConfigOthersAdapter$2
  implements Runnable
{
  OthersPage$FacesConfigOthersAdapter$2(OthersPage.FacesConfigOthersAdapter paramFacesConfigOthersAdapter) {}
  
  public void run()
  {
    OthersPage.FacesConfigOthersAdapter.access$0(this$1).resetFactoryInput();
  }
}

/* Location:
 * Qualified Name:     org.eclipse.jst.jsf.facesconfig.ui.page.OthersPage.FacesConfigOthersAdapter.2
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.jst.jsf.facesconfig.ui.page;

class OthersPage$FacesConfigOthersAdapter$3
  implements Runnable
{
  OthersPage$FacesConfigOthersAdapter$3(OthersPage.FacesConfigOthersAdapter paramFacesConfigOthersAdapter) {}
  
  public void run()
  {
    OthersPage.FacesConfigOthersAdapter.access$0(this$1).resetLifecycleInput();
  }
}

/* Location:
 * Qualified Name:     org.eclipse.jst.jsf.facesconfig.ui.page.OthersPage.FacesConfigOthersAdapter.3
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.jst.jsf.facesconfig.ui.page;

import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.common.notify.impl.AdapterImpl;
import org.eclipse.jst.jsf.facesconfig.emf.FacesConfigPackage;
import org.eclipse.swt.widgets.Display;
import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.PlatformUI;

class OthersPage$FacesConfigOthersAdapter
  extends AdapterImpl
{
  OthersPage$FacesConfigOthersAdapter(OthersPage paramOthersPage) {}
  
  public void notifyChanged(Notification msg)
  {
    if ((msg.getEventType() == 4) || 
      (msg.getEventType() == 3)) {
      if (msg.getFeature() == FacesConfigPackage.eINSTANCE
        .getFacesConfigType_Application())
      {
        if (Thread.currentThread() == PlatformUI.getWorkbench().getDisplay().getThread()) {
          this$0.resetApplicationInput();
        } else {
          PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable()
          {
            public void run()
            {
              this$0.resetApplicationInput();
            }
          });
        }
      }
      else if (msg.getFeature() == FacesConfigPackage.eINSTANCE
        .getFacesConfigType_Factory())
      {
        if (Thread.currentThread() == PlatformUI.getWorkbench().getDisplay().getThread()) {
          this$0.resetFactoryInput();
        } else {
          PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable()
          {
            public void run()
            {
              this$0.resetFactoryInput();
            }
          });
        }
      }
      else if (msg.getFeature() == FacesConfigPackage.eINSTANCE
        .getFacesConfigType_Lifecycle()) {
   
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40

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-2017. Infinite Loop Ltd