Examples of IFeature


Examples of org.apache.wookie.feature.IFeature

   */
  private void addFeatures(IHtmlProcessor engine,W3CWidget model) throws Exception{
    for (IFeatureEntity feature: model.getFeatures()){
        IPersistenceManager persistenceManager = PersistenceManagerFactory.getPersistenceManager();
      IServerFeature sf = persistenceManager.findServerFeatureByName(feature.getName());
      IFeature theFeature = getFeatureInstanceForName(sf.getClassName());
      addScripts(engine, theFeature);
      addStylesheets(engine, theFeature);
    }
  }
View Full Code Here

Examples of org.apache.wookie.feature.IFeature

   * @throws Exception if the feature cannot be instantiated
   */
  @SuppressWarnings("unchecked")
    private IFeature getFeatureInstanceForName(String featureName) throws Exception{
    Class<? extends IFeature> klass = (Class<? extends IFeature>) Class.forName(featureName);
    IFeature theFeature = (IFeature) klass.newInstance();
    return theFeature;
  }
View Full Code Here

Examples of org.apache.wookie.feature.IFeature

   * @throws Exception if the feature cannot be instantiated
   */
  @SuppressWarnings("unchecked")
    private IFeature getFeatureInstanceForName(String featureName) throws Exception{
    Class<? extends IFeature> klass = (Class<? extends IFeature>) Class.forName(featureName);
    IFeature theFeature = (IFeature) klass.newInstance();
    return theFeature;
  }
View Full Code Here

Examples of org.apache.wookie.w3c.IFeature

    }
  }

  private static void createFeatures(IPersistenceManager persistenceManager, W3CWidget model, IWidget widget){
    for(IFeature ofeature: model.getFeatures()){
            IFeature feature = persistenceManager.newInstance(IFeature.class);
      feature.setName(ofeature.getName());
      feature.setRequired(ofeature.isRequired());
            widget.getFeatures().add(feature);
      // now attach all parameters to this feature.
      for(org.apache.wookie.w3c.IParam oparam : ofeature.getParameters()){
              IParam param = persistenceManager.newInstance(IParam.class);
        param.setName(oparam.getName());
        param.setValue(oparam.getValue());
              feature.getParameters().add(param);
      }
    }
  }
View Full Code Here

Examples of org.apache.wookie.w3c.IFeature

    String pass_value="feature:a9bb79c1";
    String id="029";
    String[] tests = {"lro","rlo","rtl","ltr"};
    for (String dir: tests){
      W3CWidget widget = getWidget(id,dir);
      IFeature feature = widget.getFeatures().get(0);
      assertEquals(pass_value, feature.getName());
   
  }
View Full Code Here

Examples of org.apache.wookie.w3c.IFeature

    }
  }

  private static void createFeatures(IPersistenceManager persistenceManager, W3CWidget model, IWidget widget){
    for(IFeature ofeature: model.getFeatures()){
            IFeature feature = persistenceManager.newInstance(IFeature.class);
      feature.setName(ofeature.getName());
      feature.setRequired(ofeature.isRequired());
            widget.getFeatures().add(feature);
      // now attach all parameters to this feature.
      for(org.apache.wookie.w3c.IParam oparam : ofeature.getParameters()){
              IParam param = persistenceManager.newInstance(IParam.class);
        param.setName(oparam.getName());
        param.setValue(oparam.getValue());
              feature.getParameters().add(param);
      }
    }
  }
View Full Code Here

Examples of org.eclipse.graphiti.features.IFeature

  protected void addEntry(IMenuManager manager, IContextMenuEntry cmEntry, ICustomContext context, String groupID,
      String textParentEntry) {
    String text = cmEntry.getText();
    IContextMenuEntry[] children = cmEntry.getChildren();
    if (children.length == 0) {
      IFeature feature = cmEntry.getFeature();
      if (feature instanceof ICustomFeature && feature.isAvailable(context)) {
        IAction action = new CustomAction((ICustomFeature) feature, context, getBehavior());
        if (textParentEntry != null) {
          text = textParentEntry + " " + text; //$NON-NLS-1$
        }
        action.setText(text);
View Full Code Here

Examples of org.eclipse.graphiti.features.IFeature

  /**
   * Configure the ContextEntryFeature passed into the AbstractContextEntry constructor
   */
  public static void configure(AbstractContextEntry entry) {
    IFeature feature = entry.getFeature();
    if (feature instanceof ContextEntryFeature) {
      ContextEntryFeature aFeature = (ContextEntryFeature) feature;
      aFeature.setContextEntry(entry);
    }

View Full Code Here

Examples of org.eclipse.graphiti.features.IFeature

    } else if (source == documentationText) {
      oldValue = userTask.getDocumentation();
    }
   
    if (StringUtils.isEmpty(oldValue) || oldValue.equals(newValue) == false) {
      IFeature feature = new AbstractFeature(getDiagramTypeProvider().getFeatureProvider()) {
       
        @Override
        public void execute(IContext context) {
          if (source == assigneeText) {
            userTask.setAssignee(assigneeText.getText());
View Full Code Here

Examples of org.eclipse.update.core.IFeature

    String provider = null;
    String description = null;
    boolean isQualifierUpdate = false;

    if (fUpdates != null && fUpdates.length > 0) {
      IFeature oldFeature = fUpdates[0].getOldFeature();
      IFeature newFeature = fUpdates[0].getFeature();

      /* Versions */
      org.eclipse.core.runtime.PluginVersionIdentifier oldVersion = (oldFeature != null) ? oldFeature.getVersionedIdentifier().getVersion() : null;
      org.eclipse.core.runtime.PluginVersionIdentifier newVersion = newFeature.getVersionedIdentifier().getVersion();
      if (oldVersion != null)
        oldVer = oldVersion.getMajorComponent() + "." + oldVersion.getMinorComponent() + "." + oldVersion.getServiceComponent(); //$NON-NLS-1$ //$NON-NLS-2$
      newVer = newVersion.getMajorComponent() + "." + newVersion.getMinorComponent() + "." + newVersion.getServiceComponent(); //$NON-NLS-1$ //$NON-NLS-2$

      /* Special Treat Case of a Qualifier Update */
      if (newVer.equals(oldVer) && oldVersion != null) {
        isQualifierUpdate = true;
        String newQualifierComponent = newVersion.getQualifierComponent();
        String oldQualifierComponent = oldVersion.getQualifierComponent();
        if (newQualifierComponent.length() == 12 && oldQualifierComponent.length() == 12) {
          newVer += " (" + formatQualifier(newQualifierComponent) + ")"; //$NON-NLS-1$ //$NON-NLS-2$
          oldVer += " (" + formatQualifier(oldQualifierComponent) + ")"; //$NON-NLS-1$ //$NON-NLS-2$
        } else {
          newVer += "." + newQualifierComponent; //$NON-NLS-1$
          oldVer += "." + oldQualifierComponent; //$NON-NLS-1$
        }
      }

      /* Other */
      dlSize = newFeature.getDownloadSize() * 1000;
      provider = newFeature.getProvider();

      /* Description */
      if (!isQualifierUpdate) {
        ICategory[] categories = newFeature.getSite().getCategories();
        if (categories.length > 0) {
          IURLEntry descriptionEntry = categories[0].getDescription();
          if (descriptionEntry != null)
            description = descriptionEntry.getAnnotation();
        }
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.