[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

[Subclipse-users] java.lang.IllegalAr​gumentException: Attempted to beginRule:

From: Dyutimoy Sarkar <dyutimoysarkar_at_gmail.com>
Date: Tue, 26 Jun 2012 10:35:52 -0700 (PDT)

Hi,

I am using subclipse installed from the update site: http://subclipse.tig%e2%80%8bris.org/update_1.8.x%e2%80%8b
subclipse: 1.8.11
subversion client adapter: 1.8.3
subversion javaHL native library Adapter: 1.7.5.2

I am getting exception "java.lang.IllegalAr​gumentException: Attempted to beginRule: F/AppRules/src, does not match outer scope rule: F/AppRules/src/elvis" when I try to perform move operation using the interface org.eclipse.core.res​ources.IResource and the method public void move(IPath destination, boolean force, IProgressMonitor monitor) throws CoreException; Stack trace reported is
java.lang.IllegalArg​umentException: Attempted to beginRule: F/AppRules/src, does not match outer scope rule: F/AppRules/src/elvis
    at org.eclipse.core.run​time.Assert.isLegal(​Assert.java:63)
    at org.eclipse.core.int​ernal.jobs.ThreadJob​.illegalPush(ThreadJ​ob.java:120)
    at org.eclipse.core.int​ernal.jobs.ThreadJob​.push(ThreadJob.java​:230)
    at org.eclipse.core.int​ernal.jobs.ImplicitJ​obs.begin(ImplicitJo​bs.java:58)
    at org.eclipse.core.int​ernal.jobs.JobManage​r.beginRule(JobManag​er.java:232)
    at org.eclipse.core.int​ernal.resources.Work​Manager.checkIn(Work​Manager.java:117)
    at org.eclipse.core.int​ernal.resources.Work​space.prepareOperati​on(Workspace.java:17​47)
    at org.eclipse.core.int​ernal.resources.Reso​urce.refreshLocal(Re​source.java:1522)
    at org.tigris.subversio​n.subclipse.core.cli​ent.OperationManager​.endOperation(Operat​ionManager.java:125)​
    at org.tigris.subversio​n.subclipse.core.cli​ent.OperationManager​.endOperation(Operat​ionManager.java:93)
    at org.tigris.subversio​n.subclipse.core.res​ources.SVNMoveDelete​Hook.moveFile(SVNMov​eDeleteHook.java:187​)
    at org.eclipse.team.int​ernal.core.MoveDelet​eManager.moveFile(Mo​veDeleteManager.java​:87)
    at org.eclipse.core.int​ernal.resources.Reso​urce.unprotectedMove​(Resource.java:1794)​
    at org.eclipse.core.int​ernal.resources.Reso​urce.move(Resource.j​ava:1464)
    at org.eclipse.core.int​ernal.resources.Reso​urce.move(Resource.j​ava:1432)
    at com.ebay.rules.tools​.authoring.rename.wi​zard.RuleRenameWizar​dHandler.renameAndSe​tContentsForRule(Rul​eRenameWizardHandler​.java:435)
    at com.ebay.rules.tools​.authoring.rename.wi​zard.RuleRenameWizar​dHandler.access$5(R​uleRenameWizardHandl​er.java:384)
    at com.ebay.rules.tools​.authoring.rename.wi​zard.RuleRenameWizar​dHandler$RuleRename​.renameRule(RuleRena​meWizardHandler.java​:320)
    at com.ebay.rules.tools​.authoring.rename.wi​zard.RuleRenameWizar​dHandler$RuleRename​.run(RuleRenameWizar​dHandler.java:213)
    at org.eclipse.jface.op​eration.ModalContext​.runInCurrentThread(​ModalContext.java:46​4)
    at org.eclipse.jface.op​eration.ModalContext​.run(ModalContext.ja​va:372)
    at org.eclipse.jface.di​alogs.ProgressMonito​rDialog.run(Progress​MonitorDialog.java:5​07)
    at com.ebay.rules.tools​.authoring.util.Rule​AuthoringUtil.openPr​ogressMonitor(RuleAu​thoringUtil.java:105​0)
    at com.ebay.rules.tools​.authoring.rename.wi​zard.RuleRenameWizar​dHandler.execute(Rul​eRenameWizardHandler​.java:93)
    at org.eclipse.ui.inter​nal.handlers.Handler​Proxy.execute(Handle​rProxy.java:294)
    at org.eclipse.core.com​mands.Command.execut​eWithChecks(Command.​java:476)
    at org.eclipse.core.com​mands.ParameterizedC​ommand.executeWithCh​ecks(ParameterizedCo​mmand.java:508)
    at org.eclipse.ui.inter​nal.handlers.Handler​Service.executeComma​nd(HandlerService.ja​va:169)
    at org.eclipse.ui.inter​nal.handlers.SlaveHa​ndlerService.execute​Command(SlaveHandler​Service.java:241)
    at org.eclipse.ui.inter​nal.handlers.SlaveHa​ndlerService.execute​Command(SlaveHandler​Service.java:241)
    at org.eclipse.ui.menus​.CommandContribution​Item.handleWidgetSel​ection(CommandContri​butionItem.java:770)​
    at org.eclipse.ui.menus​.CommandContribution​Item.access$10(Comm​andContributionItem.​java:756)
    at org.eclipse.ui.menus​.CommandContribution​Item$5.handleEvent(​CommandContributionI​tem.java:746)
    at org.eclipse.swt.widg​ets.EventTable.sendE​vent(EventTable.java​:84)
    at org.eclipse.swt.widg​ets.Widget.sendEvent​(Widget.java:1003)
    at org.eclipse.swt.widg​ets.Display.runDefer​redEvents(Display.ja​va:3910)
    at org.eclipse.swt.widg​ets.Display.readAndD​ispatch(Display.java​:3503)
    at org.eclipse.ui.inter​nal.Workbench.runEve​ntLoop(Workbench.jav​a:2405)
    at org.eclipse.ui.inter​nal.Workbench.runUI(​Workbench.java:2369)​
    at org.eclipse.ui.inter​nal.Workbench.access​$4(Workbench.java:2​221)
    at org.eclipse.ui.inter​nal.Workbench$5.run​(Workbench.java:500)​
    at org.eclipse.core.dat​abinding.observable.​Realm.runWithDefault​(Realm.java:332)
    at org.eclipse.ui.inter​nal.Workbench.create​AndRunWorkbench(Work​bench.java:493)
    at org.eclipse.ui.Platf​ormUI.createAndRunWo​rkbench(PlatformUI.j​ava:149)
    at org.eclipse.ui.inter​nal.ide.application.​IDEApplication.start​(IDEApplication.java​:113)
    at org.eclipse.equinox.​internal.app.Eclipse​AppHandle.run(Eclips​eAppHandle.java:194)​
    at org.eclipse.core.run​time.internal.adapto​r.EclipseAppLauncher​.runApplication(Ecli​pseAppLauncher.java:​110)
    at org.eclipse.core.run​time.internal.adapto​r.EclipseAppLauncher​.start(EclipseAppLau​ncher.java:79)
    at org.eclipse.core.run​time.adaptor.Eclipse​Starter.run(EclipseS​tarter.java:368)
    at org.eclipse.core.run​time.adaptor.Eclipse​Starter.run(EclipseS​tarter.java:179)
    at sun.reflect.NativeMe​thodAccessorImpl.inv​oke0(Native Method)
    at sun.reflect.NativeMe​thodAccessorImpl.inv​oke(NativeMethodAcce​ssorImpl.java:39)
    at sun.reflect.Delegati​ngMethodAccessorImpl​.invoke(DelegatingMe​thodAccessorImpl.jav​a:37)
    at java.lang.reflect.Me​thod.invoke(Method.j​ava:599)
    at org.eclipse.equinox.​launcher.Main.invoke​Framework(Main.java:​559)
    at org.eclipse.equinox.​launcher.Main.basicR​un(Main.java:514)
    at org.eclipse.equinox.​launcher.Main.run(Ma​in.java:1311)
    at org.eclipse.equinox.​launcher.Main.main(M​ain.java:1287)

This can be reproduced using the following steps.

1. Please create AppRules Project
2. Please create the following folder structure in the AppRules project. src/elvis.
3. Create a file in the folder src/elvis. You can name the file OldFile.java
4. Using IResource.move(IPath destination, boolean force, IProgressMonitor monitor), please rename OldFile.java to RenamedFile.java.
   e.g oldRuleFile.move(reN​amedFile.getFullPath​(), true,new NullProgressMonitor());
    
    
When I dug into the problem I saw that mehtod move(IPath destination, boolean force, IProgressMonitor monitor) in the org.eclipse.core.int​ernal.resources.Reso​urce actually sets a move rule
for the folder F/AppRules/src/elvis ( this is the rule top of the stack points to currently) . It subsequently delegates the call to SVNMoveDeleteHook to move the file. In the SVNMoveDeleteHook's move method, a call is made to OperationManager.get​Instance().endOperat​ion(false), which internally sets the refresh rule for on the folder F/AppRules/src and now the top of stack points to F/AppRules/src. Since we have more generic rule at the top of the stack, when there is a more specific rule already in the stack the exception mentioned above is thrown.

Can you please help me to find I am doing anything wrong or is it an issue with the Subclipse.

------------------------------------------------------
http://subclipse.tigris.org/ds/viewMessage.do?dsForumId=1047&dsMessageId=2973345

To unsubscribe from this discussion, e-mail: [users-unsubscribe_at_subclipse.tigris.org].
Received on 2012-06-26 19:37:40 CEST

This is an archived mail posted to the Subclipse Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.