Package com._1c.g5.v8.dt.qw.ui.utils
Class QueryWizardServiceUtils
java.lang.Object
com._1c.g5.v8.dt.qw.ui.utils.QueryWizardServiceUtils
Services methods for query wizard
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidaddErrorMessage(StringBuilder errorMessage, String message, int lineNumber, int columnNumber) Append issue description to errors messagestatic DbViewElementcomputeDbView(org.eclipse.emf.ecore.EObject object) ComputesDbViewElementby objectstatic List<DbViewElement>computeDbViewFields(org.eclipse.emf.ecore.EObject object) Compute dbView fieldsstatic DbViewElementcomputeDbViewForTempTable(DbViewElement element, QueryWizardSource source) Compute DbView for temporary table.static QuerySchemaExpressioncopyExpression(QuerySchemaExpression expression) Get expression copystatic QuerySchemaExpressioncopyExpression(QuerySchemaExpression expression, NestedTableExpression parentNestedTable) Make copy of query schema expression.static org.eclipse.jface.dialogs.MessageDialogcreateMessageDialog(org.eclipse.swt.widgets.Shell shell, String errorMessage) Creates warning message dialog with text of errors and warnings from Query.static org.eclipse.jface.dialogs.MessageDialogcreateMessageDialog(org.eclipse.swt.widgets.Shell shell, String errorMessage, boolean askQuestion) Creates message dialog with text of errors and warnings from Query.static voidexpandJoinsToChangedItems(QueryWizardTreeViewer tree, List<QuerySchemaSource> changedSources) Expand joins tree to changed itemsstatic FunctionInvocationExpressiongetAggregateFromExpressions(org.eclipse.emf.common.util.EList<QuerySchemaExpression> fields) Is collection of expressions contain aggregate fieldstatic org.eclipse.swt.graphics.ImagegetAliasImage(QueryWizardSource source, Object element) Get image for aliasstatic List<QuerySchemaQuerySourceJoin>getAllJoins(QuerySchemaOperator operator) Get all joins in operatorstatic List<QuerySchemaQuerySourceJoin>getAllJoins(QueryWizardSource qwSource) Get all joins in operatorstatic List<QuerySchemaExpression>getAllNestedTables(org.eclipse.emf.common.util.EList<QuerySchemaExpression> fields) Get all nested tablesstatic Set<QuerySchemaSource>getAllSources(QuerySchemaOperator operator) Returns all sources contained in operatorstatic voidgetConditionAndExpressions(AbstractExpression condition, List<AbstractExpression> expressions) Break condition on expressions by AND operationstatic FunctionInvocationExpressionGet aggregate from expressionstatic List<DbViewFieldDef>getDbViewElementFields(DbViewElement element, QueryWizardSource source) Provides the list of fields for selectedDbViewElementstatic List<DbViewFieldDef>getDbViewFieldFields(DbViewFieldDef sourceItem, QueryWizardSource queryWizardSource) Get children fields in fieldstatic List<DbViewFieldDef>getDbViewFieldFields(DbViewFieldDef sourceItem, QueryWizardSource queryWizardSource, boolean suppressNotifications) Get children fields in fieldstatic DbViewElementgetDbViewForQuery(org.eclipse.emf.ecore.EObject source) Get DbView for nested querystatic StringgetDcsFieldText(Object element, QueryWizardSource source) Get dcs field textstatic StringgetEmptyQuery(ScriptVariant scriptVariant) Get empty query textstatic StringgetExpressionAlias(QueryWizardSource source, QuerySchemaExpression expression) Get alias for expressionstatic StringgetExpressionText(Object element, QueryWizardSource source) Get text for expressionstatic StringgetExpressionText(Object element, QueryWizardSource source, boolean removeLinesSeparators) Get text for expressionstatic StringgetJoinPresentation(QuerySchemaJoinType joinType) Get join type string presentationstatic StringgetLocalName(Object element, ScriptVariant scriptVariant) Get object name, depending of script variantstatic org.eclipse.core.resources.IProjectgetParentProject(org.eclipse.core.resources.IProject project, IV8ProjectManager v8ProjectManager) Returns the parent project ofIProjectif it's extension project or null otherwisestatic AbstractQuerySchemaTablegetPlacementTable(QueryWizardSource source) Get table for placement from querystatic QuerySchemaExpressionGet presentation for ref expressionstatic List<? extends DbViewElement>getQuerySchemaSourceFields(Object sourceItem, QueryWizardSource queryWizardsource) Get fields for source or field from sourcestatic ScriptVariantgetScriptVariant(org.eclipse.emf.ecore.EObject object) Get current script variant (English or Russian)static QuerySchemaSourcegetSourceFromJoin(Object source) Get source from joinstatic DbViewFromQuerygetTempTableDbView(QuerySchemaSource source) Is source temporary tablestatic StringgetTempTableName(QuerySchemaSource tempTable) Get temporary table description namestatic Map<String,QuerySchemaSelectQuery> getTempTables(QueryWizardSource source) Get temporary tables available for current querystatic Map<String,QuerySchemaSelectQuery> getTempTables(QueryWizardSource source, int queryIndex) Get temporary tables available for query by indexgetTempTablesNames(QueryWizardSource source) Get temporary tables names used in querygetTempTablesNames(QueryWizardSource source, int endQueryIndex) Get temporary tables names available for query by indexstatic StringgetTreeItemText(org.eclipse.swt.widgets.TreeItem item) Get tree item text, use '.' as separator for fields, and '[]' for nested table part.static StringgetTypeAsString(TypeDescription type, QueryWizardSource source) Get TypeDescription as stringstatic StringgetTypeAsString(TypeDescription type, QueryWizardSource source, ScriptVariant scriptVariant) Get TypeDescription as stringstatic IV8ProjectgetV8project(org.eclipse.emf.ecore.EObject object) Get the V8 project by specified object.static voidhandleQueryWizardEditException(QueryWizardEditProviderException qwException, QueryWizardControl qwControl) Processing query wizard exceptionstatic booleanisContainIndex(QueryWizardSource source, String value) Is index contain given expressionstatic booleanisContainOrder(QueryWizardSource source, String value) Is order contain given expressionstatic booleanisContainTotal(QueryWizardSource source, String value) Returns whether totals contain given expressionstatic booleanisExpressionContainSource(String sourceAlias, org.eclipse.emf.ecore.EObject expression) Is expression contain source aliasstatic booleanisExpressionsInGroupings(QuerySchemaOperator operator) If groupings have expressions - return truestatic booleanisExtensionProject(org.eclipse.core.resources.IProject project, IV8ProjectManager v8ProjectManager) Checks whether theIProjectis extension projectstatic booleanisNestedTableInGroupings(QuerySchemaOperator operator) If groupings have nested table - return truestatic booleanisNestedTableInOperator(QuerySchemaOperator operator) If operator have nested table - return truestatic booleanisNestedTableInOperator(QueryWizardSource source, int queryIndex, int operatorIndex) If operator have nested table - return truestatic booleanisNumberExpression(QueryWizardSource source, QuerySchemaExpression expression) Returns whether expression have number typestatic booleanisObjectBelongsToCurrentProject(DbViewElement dbView, IV8Project v8Project, IV8ProjectManager v8ProjectManager) Checks whether theDbViewElementbelongs to the selectedIProjectstatic booleanisObjectBelongsToCurrentProject(DbViewElement dbView, QueryWizardSource source) static booleanisObjectBelongsToCurrentProject(DbViewElement dbView, org.eclipse.core.resources.IProject project, IV8ProjectManager v8ProjectManager) Checks whether theDbViewElementbelongs to the selectedIProjectstatic booleanisObjectBelongsToCurrentProject(org.eclipse.emf.ecore.EObject eObject, IV8Project v8Project, IV8ProjectManager v8ProjectManager) Checks whether theEObjectbelongs to the selectedIProjectstatic booleanisObjectBelongsToCurrentProject(org.eclipse.emf.ecore.EObject eObject, QueryWizardSource source) static booleanisObjectBelongsToCurrentProject(org.eclipse.emf.ecore.EObject eObject, org.eclipse.core.resources.IProject project, IV8ProjectManager v8ProjectManager) Checks whether theEObjectbelongs to the selectedIProjectstatic booleanisPresentationAlias(QuerySchemaExpression expression, QueryWizardSource source) Is expressions from alias contain PRESENTATION functionstatic booleanisPresentationExpression(AbstractExpression expression) Is expression contain PRESENTATION functionstatic booleanisQueriesEquals(String query1, String query2) Is queries text equalsstatic booleanisTempTableDescription(QuerySchemaSource source, QueryWizardSource qwSource) Is source temporary table descriptionstatic StringnormalizeString(String text) Remove from text special characters and extra spacesstatic StringprepareQueryForTextModule(String query, String lineFormatter, String lineSeparator) Prepare query text for text modulestatic booleanreplaceSourceAliasInExpression(String[] oldAndNewAliases, org.eclipse.emf.ecore.EObject expression) Replace source alias in expressionstatic booleanreplaceSourceAliasInExpression(String sourceAlias, String newSourceAlias, org.eclipse.emf.ecore.EObject expression) Replace source alias in expressionstatic voidsetCanMove(TreeViewer tree, org.eclipse.jface.action.Action moveUpAction, org.eclipse.jface.action.Action moveDownAction) Set enabled state for actions move up or move downstatic booleanvalidateAlias(QueryWizardControl queryWizard, String newAlias, List<String> existAliases) Check is valid alias for expression.static StringvalidateResource(org.eclipse.emf.ecore.resource.Resource resource, org.eclipse.xtext.validation.IResourceValidator resourceValidator) Checking query schema on errorsstatic StringvalidateResource(org.eclipse.emf.ecore.resource.Resource resource, org.eclipse.xtext.validation.IResourceValidator resourceValidator, boolean onlyCritical) Checking query schema on errors
-
Constructor Details
-
QueryWizardServiceUtils
public QueryWizardServiceUtils()
-
-
Method Details
-
getDbViewForQuery
Get DbView for nested query- Parameters:
source- QuerySchemaNestedQuery- Returns:
- DbViewDef for source. Return null if parent container of nested query expression is not operator
-
computeDbView
ComputesDbViewElementby object- Parameters:
object- computeDbViewElementfor this object- Returns:
- computed
DbViewElement
-
computeDbViewFields
Compute dbView fields- Parameters:
object- - fields source- Returns:
- fields collection
-
getAllSources
Returns all sources contained in operator- Parameters:
operator-- Returns:
- all sources in operator
-
getJoinPresentation
Get join type string presentation- Parameters:
joinType- join type- Returns:
- string presentation
-
getConditionAndExpressions
public static void getConditionAndExpressions(AbstractExpression condition, List<AbstractExpression> expressions) Break condition on expressions by AND operation- Parameters:
condition- contain expression with binary operations. Not nullexpressions- collection for storing expressions from condition (broke by AND operation). Not null
-
expandJoinsToChangedItems
public static void expandJoinsToChangedItems(QueryWizardTreeViewer tree, List<QuerySchemaSource> changedSources) Expand joins tree to changed items- Parameters:
tree- tree viewerchangedSources- list of changed sources
-
handleQueryWizardEditException
public static void handleQueryWizardEditException(QueryWizardEditProviderException qwException, QueryWizardControl qwControl) Processing query wizard exception- Parameters:
qwException- query wizard exceptionqwControl- parent query wizard control
-
isNestedTableInOperator
public static boolean isNestedTableInOperator(QueryWizardSource source, int queryIndex, int operatorIndex) If operator have nested table - return true- Parameters:
querySchema- QueryWizardSourcequeryIndex- query indexoperatorIndex- operator index in query- Returns:
- true if is nested table in operator
-
isNestedTableInOperator
If operator have nested table - return true- Parameters:
operator-- Returns:
- true if is nested table in operator
-
isNestedTableInGroupings
If groupings have nested table - return true- Parameters:
operator-- Returns:
- true if is nested table in groupings
-
isExpressionsInGroupings
If groupings have expressions - return true- Parameters:
operator-- Returns:
- true if is expression in groupings
-
getSourceFromJoin
Get source from join- Parameters:
source- QuerySchemaSource- Returns:
- query schema source
-
copyExpression
Get expression copy- Parameters:
expression- query schema expression- Returns:
- copy of expression
-
copyExpression
public static QuerySchemaExpression copyExpression(QuerySchemaExpression expression, NestedTableExpression parentNestedTable) Make copy of query schema expression. If expression from nested table, expression will be copied with parent nested table.- Parameters:
expression- query schema expressionparentNestedTable- parent nested table- Returns:
- expression copy
-
isExpressionContainSource
public static boolean isExpressionContainSource(String sourceAlias, org.eclipse.emf.ecore.EObject expression) Is expression contain source alias- Parameters:
sourceAlias- source aliasexpression- query schema expression- Returns:
- if contained - return true
-
replaceSourceAliasInExpression
public static boolean replaceSourceAliasInExpression(String[] oldAndNewAliases, org.eclipse.emf.ecore.EObject expression) Replace source alias in expression- Parameters:
oldAndNewAliases- strings array with old and new aliasesexpression- query schema expression- Returns:
- true if source alias was found
-
replaceSourceAliasInExpression
public static boolean replaceSourceAliasInExpression(String sourceAlias, String newSourceAlias, org.eclipse.emf.ecore.EObject expression) Replace source alias in expression- Parameters:
sourceAlias- source aliasnewSourceAlias- new source alias. If null, alias will not be replaced.expression- query schema expression- Returns:
- true if source alias was found
-
getAggregateFromExpressions
public static FunctionInvocationExpression getAggregateFromExpressions(org.eclipse.emf.common.util.EList<QuerySchemaExpression> fields) Is collection of expressions contain aggregate field- Parameters:
fields- fields list- Returns:
- first found aggregate, if contained or null otherwise
-
getTempTablesNames
Get temporary tables names used in query- Parameters:
source- query wizard source- Returns:
- temporary tables names
-
getTempTablesNames
Get temporary tables names available for query by index- Parameters:
source- - query wizard sourceendQueryIndex- - query index- Returns:
- available temporary tables names
-
getTempTables
Get temporary tables available for current query- Parameters:
source- - query wizard source- Returns:
- available temporary tables
-
getTempTables
public static Map<String,QuerySchemaSelectQuery> getTempTables(QueryWizardSource source, int queryIndex) Get temporary tables available for query by index- Parameters:
source- - query wizard sourcequeryIndex- - query index- Returns:
- available temporary tables
-
getContainedAggregate
Get aggregate from expression- Parameters:
field- abstract expression- Returns:
- aggregate, if contained or null otherwise
-
getTreeItemText
Get tree item text, use '.' as separator for fields, and '[]' for nested table part.- Parameters:
item- tree item- Returns:
- text for tree item
-
isTempTableDescription
Is source temporary table description- Parameters:
source- - query schema source- Returns:
- true if temporary table description
-
getTempTableDbView
Is source temporary table- Parameters:
source- - query schema source- Returns:
- true if source is temporary table
-
getLocalName
Get object name, depending of script variant- Parameters:
element- - object for getting namescriptVariant- - configuration script variant- Returns:
- object name
-
isContainOrder
Is order contain given expression- Parameters:
source- query wizard sourcevalue- expression or alias- Returns:
- true if contain
-
isContainIndex
Is index contain given expression- Parameters:
source- query wizard sourcevalue- expression or alias- Returns:
- true if contain
-
isContainTotal
Returns whether totals contain given expression- Parameters:
source- query wizard sourcevalue- expression or alias- Returns:
- true if contain
-
isNumberExpression
public static boolean isNumberExpression(QueryWizardSource source, QuerySchemaExpression expression) Returns whether expression have number type- Parameters:
source- - query wizard sourceexpression- - expression- Returns:
- is number type
-
getTempTableName
Get temporary table description name- Parameters:
tempTable- - temporary table source- Returns:
- table name
-
getAllJoins
Get all joins in operator- Parameters:
qwSource- - query wizard source- Returns:
- all joins in current operator
-
getAllJoins
Get all joins in operator- Parameters:
operator- - operator- Returns:
- all joins in current operator
-
getPlacementTable
Get table for placement from query- Parameters:
source- - query wizard control- Returns:
- if query have table for placement - return table, otherwise null
-
validateResource
public static String validateResource(org.eclipse.emf.ecore.resource.Resource resource, org.eclipse.xtext.validation.IResourceValidator resourceValidator) Checking query schema on errors- Parameters:
resource- - checking resourceresourceValidator- - resource validator- Returns:
- null if no errors or errors text description
-
validateResource
public static String validateResource(org.eclipse.emf.ecore.resource.Resource resource, org.eclipse.xtext.validation.IResourceValidator resourceValidator, boolean onlyCritical) Checking query schema on errors- Parameters:
resource- - checking resourceresourceValidator- - resource validatoronlyCritical- - check only critical errors- Returns:
- null if no errors or errors text description
-
addErrorMessage
public static void addErrorMessage(StringBuilder errorMessage, String message, int lineNumber, int columnNumber) Append issue description to errors message- Parameters:
errorMessage- - errors messages listmessage- - new error messagelineNumber- - line number with errorcolumnNumber- - column number with error
-
computeDbViewForTempTable
public static DbViewElement computeDbViewForTempTable(DbViewElement element, QueryWizardSource source) Compute DbView for temporary table. My be it from parent query (for nested query)- Parameters:
element- - temporary table dbview- Returns:
- real dbview
-
getEmptyQuery
Get empty query text- Parameters:
script- variant- Returns:
- query text
-
getScriptVariant
Get current script variant (English or Russian)- Returns:
- script variant
-
getV8project
Get the V8 project by specified object.- Returns:
- v8project the V8 project, never
null
-
getAllNestedTables
public static List<QuerySchemaExpression> getAllNestedTables(org.eclipse.emf.common.util.EList<QuerySchemaExpression> fields) Get all nested tables- Parameters:
fields- - fields collection- Returns:
- nested tables collection
-
setCanMove
public static void setCanMove(TreeViewer tree, org.eclipse.jface.action.Action moveUpAction, org.eclipse.jface.action.Action moveDownAction) Set enabled state for actions move up or move down- Parameters:
tree- - tree viewermoveUpAction- - move up actionmoveDownAction- - move down action
-
normalizeString
Remove from text special characters and extra spaces- Parameters:
text- - text- Returns:
- normalized text
-
getExpressionAlias
Get alias for expression- Parameters:
source- - query wizard sourceexpression- - expression from select fields- Returns:
- expression alias
-
getAliasImage
public static org.eclipse.swt.graphics.Image getAliasImage(QueryWizardSource source, Object element) Get image for alias- Parameters:
source- query wizard sourceelement- expression- Returns:
- image. Return null if image not found.
-
getDbViewFieldFields
public static List<DbViewFieldDef> getDbViewFieldFields(DbViewFieldDef sourceItem, QueryWizardSource queryWizardSource) Get children fields in field- Parameters:
sourceItem- - parent field, cannot benullqueryWizardSource- - query wizard source, cannot benull- Returns:
- children fields, never
null, can be empty collection
-
getDbViewFieldFields
public static List<DbViewFieldDef> getDbViewFieldFields(DbViewFieldDef sourceItem, QueryWizardSource queryWizardSource, boolean suppressNotifications) Get children fields in field- Parameters:
sourceItem- - parent field, cannot benullqueryWizardSource- - query wizard source, cannot benullsuppressNotifications- - notifications suppression flag- Returns:
- children fields, never
null, can be empty collection
-
getExpressionText
Get text for expression- Parameters:
element- - expressionsource- - query wizard source return text
-
getExpressionText
public static String getExpressionText(Object element, QueryWizardSource source, boolean removeLinesSeparators) Get text for expression- Parameters:
element- - expressionsource- - query wizard sourceremoveLinesSeparators- - remove lines separators return text
-
getTypeAsString
Get TypeDescription as string- Parameters:
type- - TypeDescriptionsource- - query wizard source- Returns:
- string presentation
-
getQuerySchemaSourceFields
public static List<? extends DbViewElement> getQuerySchemaSourceFields(Object sourceItem, QueryWizardSource queryWizardsource) Get fields for source or field from source- Parameters:
sourceItem- - source or fieldqueryWizardsource- - query wizard source- Returns:
- array of fields
-
getDcsFieldText
Get dcs field text- Parameters:
element- - dcs expressionsource- - query wizard source- Returns:
- expression text
-
getTypeAsString
public static String getTypeAsString(TypeDescription type, QueryWizardSource source, ScriptVariant scriptVariant) Get TypeDescription as string- Parameters:
type- - TypeDescriptionsource- - query wizard sourcescriptVariant- - script variant- Returns:
- string presentation
-
validateAlias
public static boolean validateAlias(QueryWizardControl queryWizard, String newAlias, List<String> existAliases) Check is valid alias for expression. Will show message dialog if not valid.- Parameters:
queryWizard- - query wizard dialognewAlias- - new aliasexistAliases- - exist aliases- Returns:
- true if valid alias
-
getPresentationForRefExpression
public static QuerySchemaExpression getPresentationForRefExpression(QueryWizardSource source, QuerySchemaExpression field) Get presentation for ref expression- Parameters:
source- - query wizard sourcefield- - expression- Returns:
- expression presentation or null if field not ref
-
isPresentationExpression
Is expression contain PRESENTATION function- Parameters:
expression- - expression- Returns:
- true if expression contain PRESENTATION function
-
isPresentationAlias
public static boolean isPresentationAlias(QuerySchemaExpression expression, QueryWizardSource source) Is expressions from alias contain PRESENTATION function- Parameters:
expression- - expression from aliassource- - query wizard source- Returns:
- true if alias contain presentation function
-
isQueriesEquals
Is queries text equals- Parameters:
query1- - query textquery2- - query text- Returns:
- true if equals otherwise false
-
prepareQueryForTextModule
public static String prepareQueryForTextModule(String query, String lineFormatter, String lineSeparator) Prepare query text for text module- Parameters:
query- - query textlineFormatter- - line formatterlineSeparator- - line separator- Returns:
- formatted query text for text module
-
createMessageDialog
public static org.eclipse.jface.dialogs.MessageDialog createMessageDialog(org.eclipse.swt.widgets.Shell shell, String errorMessage, boolean askQuestion) Creates message dialog with text of errors and warnings from Query. Dialog will have one "OK" button ifaskQuestionisfalseor two buttons Yes and No ifaskQuestionistrue. Also ifaskQuestionistruedialog will be Question dialog, otherwise Warning- Parameters:
shell- activeShell, cannot benullerrorMessage- string contains all messages of errors and warnings, cannot benull- Returns:
- created message dialog with text of errors and warnings from Query, never
null
-
createMessageDialog
public static org.eclipse.jface.dialogs.MessageDialog createMessageDialog(org.eclipse.swt.widgets.Shell shell, String errorMessage) Creates warning message dialog with text of errors and warnings from Query. Dialog will have one "OK" button.- Parameters:
shell- activeShell, cannot benullerrorMessage- string contains all messages of errors and warnings, cannot benull- Returns:
- created message dialog with text of errors and warnings from Query, never
null
-
getDbViewElementFields
public static List<DbViewFieldDef> getDbViewElementFields(DbViewElement element, QueryWizardSource source) Provides the list of fields for selectedDbViewElement- Parameters:
element- currentDbViewElement, cannot benullsource- selectedQueryWizardSource, cannot benull- Returns:
- the list of fields, never
null, can be empty collection
-
isObjectBelongsToCurrentProject
public static boolean isObjectBelongsToCurrentProject(DbViewElement dbView, org.eclipse.core.resources.IProject project, IV8ProjectManager v8ProjectManager) Checks whether theDbViewElementbelongs to the selectedIProject- Parameters:
dbView- the dbView element, cannot benullproject- the project, cannot benullv8ProjectManager- the v8 project manager, cannot benull- Returns:
trueif element belongs to the project,falseotherwise
-
isObjectBelongsToCurrentProject
public static boolean isObjectBelongsToCurrentProject(DbViewElement dbView, IV8Project v8Project, IV8ProjectManager v8ProjectManager) Checks whether theDbViewElementbelongs to the selectedIProject- Parameters:
dbView- the dbView element, cannot benullv8Project- the v8 project, cannot benullv8ProjectManager- the v8 project manager, cannot benull- Returns:
trueif element belongs to the project,falseotherwise
-
isObjectBelongsToCurrentProject
public static boolean isObjectBelongsToCurrentProject(org.eclipse.emf.ecore.EObject eObject, org.eclipse.core.resources.IProject project, IV8ProjectManager v8ProjectManager) Checks whether theEObjectbelongs to the selectedIProject- Parameters:
eObject- theEObject, cannot benullproject- the project, cannot benullv8ProjectManager- the v8 project manager, cannot benull- Returns:
trueif element belongs to the project,falseotherwise
-
isObjectBelongsToCurrentProject
public static boolean isObjectBelongsToCurrentProject(org.eclipse.emf.ecore.EObject eObject, IV8Project v8Project, IV8ProjectManager v8ProjectManager) Checks whether theEObjectbelongs to the selectedIProject- Parameters:
eObject- theEObject, cannot benullv8Project- the v8 project, cannot benullv8ProjectManager- the v8 project manager, cannot benull- Returns:
trueif element belongs to the project,falseotherwise
-
isObjectBelongsToCurrentProject
public static boolean isObjectBelongsToCurrentProject(DbViewElement dbView, QueryWizardSource source) - Parameters:
eObject- the dbView element, cannot benullsource- the query wizard source, cannot benull- Returns:
trueif element belongs to the project,falseotherwise
-
isObjectBelongsToCurrentProject
public static boolean isObjectBelongsToCurrentProject(org.eclipse.emf.ecore.EObject eObject, QueryWizardSource source) - Parameters:
eObject- theEObject, cannot benullsource- the query wizard source, cannot benull- Returns:
trueif element belongs to the project,falseotherwise
-
isExtensionProject
public static boolean isExtensionProject(org.eclipse.core.resources.IProject project, IV8ProjectManager v8ProjectManager) Checks whether theIProjectis extension project- Parameters:
project- theIProject, cannot benullv8ProjectManager- theIV8ProjectManager, cannot benull- Returns:
trueif the project is the extension,falseotherwise
-
getParentProject
public static org.eclipse.core.resources.IProject getParentProject(org.eclipse.core.resources.IProject project, IV8ProjectManager v8ProjectManager) Returns the parent project ofIProjectif it's extension project or null otherwise- Parameters:
project- theIProject, cannot benullv8ProjectManager- theIV8ProjectManager, cannot benull- Returns:
IProjectif the project is the extension,nullotherwise
-