@Override public String getTitle() { if (fAlias != null) return fAlias.getTexture(); return fTableRefRef != null ? fTableRefRef.getTargetName() + SEPARATOR + fTarget.getTexture() : fTarget.getTexture(); }
public boolean exitTableRefReference(TableRefReference ast, TScope scope) { if (ASSIT_TABLE_REFERENCE && ast.getTargetName() != null) { if (fData.pretreatment) { if (fData.selection == ast) { // TScope scope=fData.processor.getCurrentWalkControler().getDataScope(); DataReference<IResultSetReference, ITableDefine> ref = scope.getTableReference(ast.getTargetName()); if (ref != null) { if (ref.ast == null || ref.ast.getPosition() == null) { fData.target = new SelectionTargetData<TScope>(ast, scope); } else { fData.target = new SelectionTargetData<TScope>(ref.ast, scope); } } } } else if (fData.target != null) { if (fData.target.ast instanceof IResultSetReference) { IResultSetReference tableRef = (IResultSetReference) fData.target.ast; if (ast.getTargetName().equals(tableRef.getAlias())) { // TScope scope=fData.processor.getCurrentWalkControler().getDataScope(); DataReference<IResultSetReference, ITableDefine> ref = scope.getTableReference(ast.getTargetName()); // 确保该引用处于目标域中 if (ref != null && ref.ast == tableRef) { fData.assit(ast.getPosition(), fData.target); } // for(;scope!=null;scope=scope.getParent()) { // if(scope==fData.target.scope) { // fData.assit(ast.getPosition(), fData.target); // break; // } // } } } } } return false; }