Class DtNewWizardParentDetectionStrategy.ByFeatures

    • Constructor Detail

      • ByFeatures

        public ByFeatures​(org.eclipse.emf.ecore.EStructuralFeature... features)
        Instantiates a new by-features strategy.
        Parameters:
        features - the features to use for parent detection.
    • Method Detail

      • isPotentialParent

        public boolean isPotentialParent​(Object element)
        Checks whether the given element is a potential parent.
        Specified by:
        isPotentialParent in interface IDtNewWizardParentDetectionStrategy
        Parameters:
        element - element to check.
        Returns:
        true if element is a potential parent, false otherwise.
      • areChildrenPotentialParents

        public boolean areChildrenPotentialParents​(Object element)
        Checks whether the given element has potential parents among its children.
        Specified by:
        areChildrenPotentialParents in interface IDtNewWizardParentDetectionStrategy
        Parameters:
        element - element to check.
        Returns:
        true if element has potential parents in its children, false otherwise.
      • getV8ProjectManager

        protected IV8ProjectManager getV8ProjectManager()
        Returns the V8 project manager.
        Returns:
        the V8 project manager, never null.
      • detectInSelection

        protected boolean detectInSelection​(IDtNewWizardContext<?> context,
                                            Object selection,
                                            boolean searchForFeatureInParent)
        Detect parent by selected object.
        Parameters:
        context - the wizard context, cannot be null
        selection - the selected object, cannot be null
        searchForFeatureInParent - serch in parent flag
        Returns:
        true if detected
      • obtainFeatureHint

        protected org.eclipse.emf.ecore.EStructuralFeature obtainFeatureHint​(Object selection)
        Obtaines feature hint.
        Parameters:
        selection - the selection, can not be null
        Returns:
        the obtained feature, null if not obtained