Examples of adapt()


Examples of org.eclipse.bpel.common.extension.model.util.ExtensionmodelAdapterFactory.adapt()

     
    }
   
    if(extensionSet != null){
      ExtensionmodelAdapterFactory adapterFactory = new ExtensionmodelAdapterFactory();
      adapterFactory.adapt(extensionSet,ExtensionMapAdapterImpl.class);
    }
   
    return extensionSet;
  }
View Full Code Here

Examples of org.eclipse.emf.common.notify.AdapterFactory.adapt()

    if (object instanceof IPropertySource) {
      return (IPropertySource) object;
    }
    AdapterFactory af = getAdapterFactory(object);
    if (af != null) {
      IItemPropertySource ips = (IItemPropertySource) af.adapt(object,
          IItemPropertySource.class);
      if (ips != null) {
        return new PropertySource(object, ips);
      }
    }
View Full Code Here

Examples of org.eclipse.emf.edit.provider.ComposedAdapterFactory.adapt()

                                        expectedMethodBindings);
           
            completionList = new ArrayList<ICompletionProposal>();
            for (final ISymbol propSymbol : suffixes) {
                final Object  provider =
                  factory.adapt(propSymbol, IContentProposalProvider.class);

                if (provider instanceof IContentProposalProvider)
                {
                    final ICompletionProposal[] proposal  =
                        ((IContentProposalProvider) provider).
View Full Code Here

Examples of org.eclipse.jst.jsp.core.internal.document.PageDirectiveAdapter.adapt()

        }
       
        potentialModelQueryObject = (ModelQuery) embeddedModelQueries.get(effectiveContentType);
       
        if (potentialModelQueryObject == null) {
          ModelQueryAdapter embeddedAdapter = (ModelQueryAdapter) pageDirectiveAdapter.adapt((INodeNotifier) node, ModelQueryAdapter.class);
          if (embeddedAdapter != null) {
            // we will cache one model query per content type
            embeddedModelQuery = embeddedAdapter.getModelQuery();
            embeddedModelQueries.put(effectiveContentType, embeddedModelQuery);
          }
View Full Code Here

Examples of org.eclipse.mylyn.tasks.ui.editors.AttributeEditorToolkit.adapt()

      AttributeEditorToolkit editorToolkit = getTaskEditorPage().getAttributeEditorToolkit();
      AbstractAttributeEditor attributeEditor = createAttributeEditor(RedmineTaskTimeEntryMapper.getHoursAttribute(attribute));
      attributeEditor.createLabelControl(titleComposite, toolkit);
      attributeEditor.createControl(titleComposite, toolkit);
      attributeEditor.getLabelControl().setBackground(bgColor);
      editorToolkit.adapt(attributeEditor);
     
      //Activity
      attributeEditor = createAttributeEditor(RedmineTaskTimeEntryMapper.getActivityAttribute(attribute));
      attributeEditor.createLabelControl(titleComposite, toolkit);
      attributeEditor.createControl(titleComposite, toolkit);
View Full Code Here

Examples of org.eclipse.sapphire.Element.adapt()

    protected Object run( final Presentation context )
    {
        final MasterDetailsContentNodePart node = (MasterDetailsContentNodePart) getPart();
        final Element element = node.getLocalModelElement();
       
        element.adapt( SourceEditorService.class ).show( element, null );
       
        return null;
    }
  
}
View Full Code Here

Examples of org.eclipse.sapphire.Resource.adapt()

    {
        final Resource resource = element.resource();
       
        if( resource instanceof XmlResource )
        {
            return resource.adapt( RootXmlResource.class ).getDomDocument();
        }
       
        return null;
    }
   
View Full Code Here

Examples of org.eclipse.sapphire.modeling.xml.RootXmlResource.adapt()

        final Document document = service.convert( xmlResource, Document.class );
       
        assertNotNull( document );
        assertSame( document, xmlResource.getDomDocument() );
        assertSame( document, xmlResource.adapt( Document.class ) );
    }
   
    @Test
   
    public void testXmlResourceToDomElement() throws Exception
View Full Code Here

Examples of org.eclipse.sapphire.modeling.xml.XmlResource.adapt()

        final Element childXmlElement = service.convert( childElement.resource(), Element.class );
        final XmlResource childXmlResource = (XmlResource) childElement.resource();
       
        assertNotNull( childXmlElement );
        assertSame( childXmlElement, childXmlResource.getXmlElement().getDomNode() );
        assertSame( childXmlElement, childXmlResource.adapt( Element.class ) );
        assertNotSame( childXmlElement, xmlElement );
    }
   
    @Test
   
View Full Code Here

Examples of org.eclipse.sapphire.ui.def.ISapphireUiDef.adapt()

            {
                final Reference referenceAnnotation = property.getAnnotation( Reference.class );
   
                if( referenceAnnotation != null && referenceAnnotation.target() == JavaType.class )
                {
                    final IProject project = def.adapt( IProject.class );
                   
                    if( project != null )
                    {
                        try
                        {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.