1 /******************************************************************************* 2 * Copyright (c) 2000, 2008 IBM Corporation and others. 3 * 4 * This program and the accompanying materials 5 * are made available under the terms of the Eclipse Public License 2.0 6 * which accompanies this distribution, and is available at 7 * https://www.eclipse.org/legal/epl-2.0/ 8 * 9 * SPDX-License-Identifier: EPL-2.0 10 * 11 * Contributors: 12 * IBM Corporation - initial API and implementation 13 *******************************************************************************/ 14 package org.eclipse.jdt.internal.corext.refactoring.tagging; 15 16 /** 17 * Interface implemented by processors able to rename similar declarations. 18 * 19 * @since 3.2 20 */ 21 public interface ISimilarDeclarationUpdating { 22 23 /** 24 * Checks if this refactoring object is capable of updating similar declarations 25 * of the renamed element. 26 * 27 * This can be disabled globally by setting the product configuration property 28 * "org.eclipse.jdt.ui.refactoring.handlesSimilarDeclarations" to "false". 29 */ canEnableSimilarDeclarationUpdating()30 public boolean canEnableSimilarDeclarationUpdating(); 31 32 /** 33 * If <code>canEnableSimilarElementUpdating</code> returns 34 * <code>true</code>, then this method is used to inform the refactoring 35 * object whether similar declarations should be updated. This call can be 36 * ignored if <code>canEnableSimilarElementUpdating</code> returns 37 * <code>false</code>. 38 */ setUpdateSimilarDeclarations(boolean update)39 public void setUpdateSimilarDeclarations(boolean update); 40 41 /** 42 * If <code>canEnableSimilarElementUpdating</code> returns 43 * <code>true</code>, then this method is used to ask the refactoring 44 * object whether similar declarations should be updated. This call can be 45 * ignored if <code>canEnableSimilarElementUpdating</code> returns 46 * <code>false</code>. 47 */ getUpdateSimilarDeclarations()48 public boolean getUpdateSimilarDeclarations(); 49 50 /** 51 * If <code>canEnableSimilarElementUpdating</code> returns 52 * <code>true</code>, then this method is used to set the match strategy 53 * for determining similarly named elements. 54 * 55 * @param selectedStrategy one of the STRATEGY_* constants in {@link org.eclipse.jdt.internal.corext.refactoring.rename.RenamingNameSuggestor} 56 */ setMatchStrategy(int selectedStrategy)57 public void setMatchStrategy(int selectedStrategy); 58 59 /** 60 * If <code>canEnableSimilarElementUpdating</code> returns 61 * <code>true</code>, then this method is used to ask the refactoring 62 * object which match strategy is used for determining similar elements. 63 * 64 * @return one of the STRATEGY_* constants in {@link org.eclipse.jdt.internal.corext.refactoring.rename.RenamingNameSuggestor} 65 */ getMatchStrategy()66 public int getMatchStrategy(); 67 68 }