From dc529a56defdbe9c2bed4dbf71352be5d7ab6070 Mon Sep 17 00:00:00 2001 From: Alexander Lobas Date: Tue, 27 Mar 2012 22:03:36 +0400 Subject: [PATCH] Android widgets --- .../AndroidDesignerEditorPanel.java | 2 + .../designSurface/DropToOperation.java | 11 +- .../designSurface/TreeDropToOperation.java | 14 +- .../designer/icons/AdapterViewFlipper.png | Bin 0 -> 550 bytes .../designer/icons/ExpandableListView.png | Bin 0 -> 1104 bytes .../android/designer/icons/Gallery.png | Bin 0 -> 1251 bytes .../android/designer/icons/ImageSwitcher.png | Bin 0 -> 1240 bytes .../designer/icons/MediaController.png | Bin 0 -> 1204 bytes .../android/designer/icons/Spinner.png | Bin 0 -> 1292 bytes .../android/designer/icons/StackView.png | Bin 0 -> 481 bytes .../android/designer/icons/TextSwitcher.png | Bin 0 -> 1174 bytes .../android/designer/icons/ViewAnimator.png | Bin 0 -> 1156 bytes .../android/designer/icons/ViewFlipper.png | Bin 0 -> 1143 bytes .../android/designer/icons/ViewSwitcher.png | Bin 0 -> 1105 bytes .../android/designer/icons/scroll_to_h_v.png | Bin 0 -> 178 bytes .../android/designer/model/ModelParser.java | 45 +++- .../designer/model/PropertyParser.java | 11 + .../model/RadImageSwitcherLayout.java | 25 ++ .../model/RadScrollViewComponent.java | 54 ++++ .../designer/model/RadScrollViewLayout.java | 38 +++ .../model/RadSingleChildrenViewLayout.java | 4 +- .../designer/model/RadTextSwitcherLayout.java | 27 ++ .../designer/model/RadTypeSwitcherLayout.java | 55 ++++ .../designer/model/RadViewAnimatorLayout.java | 41 +++ .../designer/model/RadViewSwitcherLayout.java | 28 ++ .../designer/model/views-meta-model.xml | 245 +++++++++++++++++- .../designer/DesignerToolWindowManager.java | 7 +- .../designer/actions/DesignerActionPanel.java | 6 +- .../intellij/designer/model/RadComponent.java | 6 +- .../intellij/designer/model/RadLayout.java | 6 +- 30 files changed, 606 insertions(+), 19 deletions(-) create mode 100644 plugins/android-designer/src/com/intellij/android/designer/icons/AdapterViewFlipper.png create mode 100644 plugins/android-designer/src/com/intellij/android/designer/icons/ExpandableListView.png create mode 100644 plugins/android-designer/src/com/intellij/android/designer/icons/Gallery.png create mode 100644 plugins/android-designer/src/com/intellij/android/designer/icons/ImageSwitcher.png create mode 100644 plugins/android-designer/src/com/intellij/android/designer/icons/MediaController.png create mode 100644 plugins/android-designer/src/com/intellij/android/designer/icons/Spinner.png create mode 100644 plugins/android-designer/src/com/intellij/android/designer/icons/StackView.png create mode 100644 plugins/android-designer/src/com/intellij/android/designer/icons/TextSwitcher.png create mode 100644 plugins/android-designer/src/com/intellij/android/designer/icons/ViewAnimator.png create mode 100644 plugins/android-designer/src/com/intellij/android/designer/icons/ViewFlipper.png create mode 100644 plugins/android-designer/src/com/intellij/android/designer/icons/ViewSwitcher.png create mode 100644 plugins/android-designer/src/com/intellij/android/designer/icons/scroll_to_h_v.png create mode 100644 plugins/android-designer/src/com/intellij/android/designer/model/RadImageSwitcherLayout.java create mode 100644 plugins/android-designer/src/com/intellij/android/designer/model/RadScrollViewLayout.java create mode 100644 plugins/android-designer/src/com/intellij/android/designer/model/RadTextSwitcherLayout.java create mode 100644 plugins/android-designer/src/com/intellij/android/designer/model/RadTypeSwitcherLayout.java create mode 100644 plugins/android-designer/src/com/intellij/android/designer/model/RadViewAnimatorLayout.java create mode 100644 plugins/android-designer/src/com/intellij/android/designer/model/RadViewSwitcherLayout.java diff --git a/plugins/android-designer/src/com/intellij/android/designer/designSurface/AndroidDesignerEditorPanel.java b/plugins/android-designer/src/com/intellij/android/designer/designSurface/AndroidDesignerEditorPanel.java index 216709a18dc3..3f9b7711f8a3 100644 --- a/plugins/android-designer/src/com/intellij/android/designer/designSurface/AndroidDesignerEditorPanel.java +++ b/plugins/android-designer/src/com/intellij/android/designer/designSurface/AndroidDesignerEditorPanel.java @@ -177,6 +177,8 @@ public final class AndroidDesignerEditorPanel extends DesignerEditorPanel { ModelParser.updateRootComponent(rootComponent, mySession, rootView); myLayeredPane.repaint(); + + DesignerToolWindowManager.getInstance(getProject()).refresh(); } }); } diff --git a/plugins/android-designer/src/com/intellij/android/designer/designSurface/DropToOperation.java b/plugins/android-designer/src/com/intellij/android/designer/designSurface/DropToOperation.java index 3ccb4f968921..8ac4aaf9f624 100644 --- a/plugins/android-designer/src/com/intellij/android/designer/designSurface/DropToOperation.java +++ b/plugins/android-designer/src/com/intellij/android/designer/designSurface/DropToOperation.java @@ -81,8 +81,15 @@ public class DropToOperation implements EditOperation { @Override public void execute() throws Exception { - for (RadComponent component : myComponents) { - ModelParser.addComponent(myContainer, (RadViewComponent)component, null); + if (myContext.isAdd()) { + for (RadComponent component : myComponents) { + ModelParser.moveComponent(myContainer, (RadViewComponent)component, null); + } + } + else { + for (RadComponent component : myComponents) { + ModelParser.addComponent(myContainer, (RadViewComponent)component, null); + } } } } \ No newline at end of file diff --git a/plugins/android-designer/src/com/intellij/android/designer/designSurface/TreeDropToOperation.java b/plugins/android-designer/src/com/intellij/android/designer/designSurface/TreeDropToOperation.java index 80fd38068843..9c1b22416373 100644 --- a/plugins/android-designer/src/com/intellij/android/designer/designSurface/TreeDropToOperation.java +++ b/plugins/android-designer/src/com/intellij/android/designer/designSurface/TreeDropToOperation.java @@ -31,6 +31,18 @@ public class TreeDropToOperation extends TreeEditOperation { @Override protected void execute(RadComponent insertBefore) throws Exception { - ModelParser.addComponent((RadViewComponent)myHost, (RadViewComponent)myComponents.get(0), (RadViewComponent)insertBefore); + RadViewComponent host = (RadViewComponent)myHost; + RadViewComponent before = (RadViewComponent)insertBefore; + + if (myContext.isAdd()) { + for (RadComponent component : myComponents) { + ModelParser.moveComponent(host, (RadViewComponent)component, before); + } + } + else { + for (RadComponent component : myComponents) { + ModelParser.addComponent(host, (RadViewComponent)component, before); + } + } } } \ No newline at end of file diff --git a/plugins/android-designer/src/com/intellij/android/designer/icons/AdapterViewFlipper.png b/plugins/android-designer/src/com/intellij/android/designer/icons/AdapterViewFlipper.png new file mode 100644 index 0000000000000000000000000000000000000000..89f8c638d1e803976b28de8b9aa6d633d5c43fe8 GIT binary patch literal 550 zcmV+>0@?kEP)Px#24YJ`L;(K){{a7>y{D4^000SaNLh0L01FcU01FcV0GgZ_00007bV*G`2ipM| z6dVq|ybK=z000?uMObu0Z*6U5Zgc=ca%Ew3Wn>_CX>@2HM@dakSAh-}0004jNkl41T5QRTmyiP0>D@GKtobqB~p%{=*+&d-I6jVF_kAQS(Xb=U^#ENOCoG03| zGb#4+bAziinQk>R-<&x+7g?4${}`Li=Ar_yUa#M;aL3#+Gt3>2hPmNpv^yODDgcc} zqtv%rt(Z=yJUxBKtN@tfZkQ#&K1vGAjplt5N%VR>@_a_O+btk5sj#G?1c=cRy-3Vv zvqQmrKBv`c;ci4r06zz)B<yMsTcCSC$4789e0#q@f; zPOVns=F<%T*Vi8bkVJ@oDNqO}Cz}*_;lbPQH>%Yt3aM#09G;t~7*CFA-<$wfS04^{ oFdB{0MVd1nkB@+Uzt4Y*KdmBchyiokUH||907*qoM6N<$g0)24-v9sr literal 0 HcmV?d00001 diff --git a/plugins/android-designer/src/com/intellij/android/designer/icons/ExpandableListView.png b/plugins/android-designer/src/com/intellij/android/designer/icons/ExpandableListView.png new file mode 100644 index 0000000000000000000000000000000000000000..fd1069797a823db206186e4755b808e784043c55 GIT binary patch literal 1104 zcmbVL&rj1(9Ip%=g81v^kHfPVPp*A$Y%47kDC;JR4wtbg-ssu~YoI@9AFShG)EEtT zfeS~%!Duwbz`>IT5jjvA{HB_Iff8^KKef%;9+tkIs*j z^!X`WG}wWD&=*Klz`{fWfi-RWQXsQ+U5W0)Yn}yl2$_=E9jC_f1(0?;43Zp-=`e*r zD#4)y6cge_5QhlzD9%G6hM<%bB#1!cVW~CGn2?HUwqc8&WVS+xEAf1_TIH(Uoa0UM zNEAgL#`$XrY9ONx4jH{0JNfG~XV^6eSs=1giV&9qdbXt#zt|po0Zhu1|ka{Cs^-Nk6ZCZ8o zSqs}Fr^+n-!x^SQQ`7?y5)x2|!&DDKVxn77vZ|O?p&}|U)zsLFi&Bb`fQp(F1p%Q9 z>Pg0jhENhFMKzmM)J&6`vwfo3I&RuEsoe%Qy)RcvdsrimS8|-`W(O214sra782gtgaz7(SH+$=hmEY~SfHL^$=t&OnD{qxWk^V;yJ1RDQ~@cf!Zx_Z|74A) z&hTM-{M9baE82tMcDMQIVRwA6O=rfV!*Ms@9?-$MnNyWguvPxDy*&;Nt}`>Wnz;P5 zx3~8Oc(%CMZY->ygDX6fBM zCK`>lq(EftW9zS5_K}VbZD8}mp>eX=|LFaye7W#qV*@Q2WpH90e7H6E$dsocT zU|q$TjM5uHjiiQvXjmA880b@A7=dt*K|#m`xgOw$2(rk}!iWz+J`~|00-Fy_yjj_C zJ}o6SeUVd?&N+_BvuvSIUtTZVOelPE$NTa--}F_6_XH?MVV+ezbp!q`^Z&PLXZLwm)ABe+Hh>JuJ>PNjHe>{#tFvLlTgdp`duu0u^WL?1xzpCqZ z0~>rGmKQB7JBF1pjC`X5hH{2u*g3-l;&6yTASElR?n>MOZR9IqOFf3O3CqyHI>WrW zT?E1ZW-i1dq8NbTh#*CfAPMv)Hv4~AV@WWq+aCXFmxhS+pu62_esb6vAFPv^vB+?& z6ptUEsHR7fl8`C>F!ooy9&6rLK5BZu`}}9miyxl3pM&!^dSD6&r)AH*eCsdsFMsvU z)76ZNNjNWS7BQ65!`r_|*t{u5_ zw^UzKR%*8&Z|+`hhxPkM2H%X8>gO*}7d$Paf1a(?))uJw(d7HL#82a$Kb3A%O2^*) zvz5}hSD!lm*auyU-twbEUw8DZ-h7YmxCnkcb#KQtKse!g#l|O`6Dl6^G%JQA|FFob&E3G^3 tiphbu_g~y|=JYM=WA9G&FxW}8bW&RW`m@0&FSG7%C)qzJeG(r%@i*DetHS^Q literal 0 HcmV?d00001 diff --git a/plugins/android-designer/src/com/intellij/android/designer/icons/ImageSwitcher.png b/plugins/android-designer/src/com/intellij/android/designer/icons/ImageSwitcher.png new file mode 100644 index 0000000000000000000000000000000000000000..c089a2aca0b1269f73220d8f2e395d13b995225a GIT binary patch literal 1240 zcmbVMU1%It6rPYawv7oztu%?)VIsBI?99EB-JQ&2w{>=A*DiF|xLNJugUw{-COgf} zPiH3GNuVj#_CZZW8Yx9kwj#t@$b*6u1GPjF@WI&P526oE+J`i>Y9U$`M7@(_qeAF| z12gyDbI;FrzH`pJ+?9Q*VN3HCf*=~w`{W#6w+8Q~I{e+S^p}E{CNEj=x~)F1tT>1e zHLDkqX+!BpIizSqhd)Cxf~YO(`GQx->=#tapp`&}_6-|b6GUvUZ!78m^2lD)ubXk| zr^!z!QrF_tfk*~qYzYlI;t$-?Ix=6`#5E-FCNCi2p?X>0eGmz(b2CxjvhOkD+9Wp(|51DRj)q{*&)zNKF zw@fndsPtNcUYx>6S5h$SOlHlo>8=umDPw%aW*`k1!wB+P)^@!d`Ul3k+HQWxMobR5 z)}W)}di1qcjWKuk4iqS2G{V!4j*Fs{WJ?`1km;r6IE8O$P1i6*9RNZu3^*1*$9lF<;zcP6q7k0sAWXuJ2%AX22#D}WuU$iy?_ z;NdXNHn$Q)OF4+NftI98;kWV`Agq&FFLdHW9+2u2-px7x%n= zdiUA-3yEC~mDICeKlc8_t@I-&r>`%L5aVu=_+s?r1KS%n$9^CVPRxG3{nMYh4>|v} zJK*LC_r3dWP5sh2Pmg?bu;sTA;_ZcP&6S_L6Lr%k$ql=~ag{d8jjbDa; ppZr)q-L&z~wkIAugN`D5TMxl1m+sczIdL`k*QAqKc_Pts{BPa!p>_ZO literal 0 HcmV?d00001 diff --git a/plugins/android-designer/src/com/intellij/android/designer/icons/MediaController.png b/plugins/android-designer/src/com/intellij/android/designer/icons/MediaController.png new file mode 100644 index 0000000000000000000000000000000000000000..ef30b340a9531439743e0f4fa699e65d5202fdd6 GIT binary patch literal 1204 zcmbVMU1%It6rTFC4QW$Tt;H(X>y#*Jcjn&Rot>Q_YdSl#YqoTfxLI{WZOF~c-RzLe zk2ACGCjNkp4fs$&TdH6iDu^#aYe9U7LKPp1AhZ&EuvRQls1)lDqDBz(PO=*nLLVHM zx%ZxXzVq{)bLPdNfrq;~@9bn4rmNVmmFU_Xy&W<7-TBL3m@YfQd?g%qt6>BCgi%a) zoPeT@CrF84bNb0oNH4?OShLENu%hpi4cF#yq{B6BkD?i-x3B48W0HhmoJ?3wmi_Vl zvn;U8Ec>{iL)}wJ&FY`=$?(iT*_fF$B$MrX2=q2(YQQET22Fd)3FKy$U9l_EeI({t zu%Z%9X4%!CD*6ymU7rAfgK-0<5lE*vl!8)9+6@vAK^`S|D8><#1yP0wv>ujv^UbPU z(h4nK^ps_5Vd%*`-)JATHuC@h@1cq;Uq2)Rt zvWUmsdYENtq^l{|p02MMc7hgBlrp}FJsxq8x9upe740A_k$=KiS34+AdxS5Mz^(fR ztw(iN8%(*ozN1KyMk5dU7A*>%(p;l%6DKTcS(e^#re#u!G7up#1;qqRXAqK7Nku7W zlBz*PQee7mV?8V?2x>khsDdPl2<1^mNaS)zfP$nI3W}C*V~b7@V#gqDzZUh|!sf1v zl~teM(Dlo%JJs%hp_&`ILCy7mIxKJq=-9BFND>ujHD8VR)>FhR_^u6B7?!PdB7mv? zX0GH!RZYUQsAwWmG=*(p&Huw1PlMs3_V`!3v_-TBqwQMr)5F^M5Qol;Plv-i^6tHK zu$GFNQf^*+a~O5b?&&^$o3iur#&P_{;X``&O;7KCyZp!DLD>C$>5Ki#H*ebX(cTYk zS!P}zb9$cN7JDKIcQ-D5dhLg=u8tf#vEkC~2Y$Nn;As8U`-)35^XE#916Lk`a4IS%w%eqKTy7o)obll%_5bU{Q4sM=(bpsyRp3-M~&wuvbwT0@A zXW;qd)rG<%+a{}1vubuZ_W9tmC!g!M=eN5q;IDt*n%}x_@mn(XWqK(yM@G)=?O#0l z>&x?J=WC~x(;sf%^6@*dpYOi1u`9NyJ}^3Z!)E4%1?A5(l~+LYA1USsv{SjUgMR~R CdX3%y literal 0 HcmV?d00001 diff --git a/plugins/android-designer/src/com/intellij/android/designer/icons/Spinner.png b/plugins/android-designer/src/com/intellij/android/designer/icons/Spinner.png new file mode 100644 index 0000000000000000000000000000000000000000..34cdc7cf96b774a21b6ea4b97f3d3519701b0abf GIT binary patch literal 1292 zcmbVMYitx%6doUerIw^>HL$66I`rr6&YgWtXWT8F-Pvt7vSrzBWHlH&ow?l|+j%fE zWw$Gs(54|3i3B3S+Qh^}kPWCjA}J`?@&g}8V~LN*)A;ydF~ks}CP2N@cB>{0Kb&Od z-h1x(&f`1h%y6o`b$OMu3d6AFi8els)*AbDEJ5G;n==AhR$8&F)uDA;1;KzACuv;} zPbfkTrlBD9Z~P2~FzkW6oXJ|*U+%*kq)xN-6{ zfy+{uSRY7&q#lKNxvgZtj#7I@EcJ+tM67PcLq!%DP@pB?MWt6Y*kTG6LUdjlPNr^84wS6fLjDX3J>}{lpipD#)W$U1xU(E0@_UhHbAq0!sj0Xc{8ML zHqFQ9eW6pB$Xk}ql4PM!@DzL=&B&1y!!RW9l3uSHX}HaP)e?$s)m&Avz(Z3sWZjZA z6}K%4U0R%=CR1~3?*Tg;rs#byz6X?bx$r7Td2~ZU62ecOin<$F$ z`#3JnGf^IJ3LH^EkPAw#jkAp zox=w2iDjb(6fDiiXj*Tj15$a-(#*W3LIxg3mI{ z%8Nzd|8M48gpNjiAV_mOO>sO&%wwhh!y1W#A?^0~SG!b1s0Z!sLi3};!uUWH&5VJD zFFlz4j#j{;q9p zZxZCSLC0A8`H5$it(f|A_eG6s7#kgJsDIV<#kuRpuO6J(bn*`NL2j>@-QwF^b^WMW zmphepEjjSo*&jpIXD;tObTyESUhogLIH%G}-<@_&e$!K3E|+$U|DdZ+*_}zp$)aCL9CjJ1;qFLX(4yiKe$EH>Z@Z9^3x*Cl)(2ed3AJK0NZ&wy$3t zI^x~|Nh~76Y>GjT<+Spckqquo rmS!HB+PR1Qj$d~ySNx@L<+cN04cwzI2bvH3YX6@Sv3CBwNaw)c$&J9x literal 0 HcmV?d00001 diff --git a/plugins/android-designer/src/com/intellij/android/designer/icons/StackView.png b/plugins/android-designer/src/com/intellij/android/designer/icons/StackView.png new file mode 100644 index 0000000000000000000000000000000000000000..203bafc61986a02b8d40f4fd6726b5063d130789 GIT binary patch literal 481 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|*pj^6T^Rm@ z;DWu&Cj&(|3p^r=85p>QL70(Y)*K0-AbW|YuPgg)MoAHQUY;3zX+R;#64!_l=ltB< z)VvY~=c3falGGH1^30M91$R&1fbd2>aiCQ;o-U3d7N?I+w#_@_Akb>BqUYkunCZdX zWaJU@giEH=NImdKI;Vst0B`QT0RR91 literal 0 HcmV?d00001 diff --git a/plugins/android-designer/src/com/intellij/android/designer/icons/TextSwitcher.png b/plugins/android-designer/src/com/intellij/android/designer/icons/TextSwitcher.png new file mode 100644 index 0000000000000000000000000000000000000000..6de1d92e1bbb10b0959b358fd8b6a3a349637237 GIT binary patch literal 1174 zcmbVMYiJZ#6rOgA4I!x!{8JIUOu$xfXYSqI*~v_@HM4uOb;aF=&1xbNadze=J0$by z%uRPUBBrqvDk7rNLZSWD=0~Z0NhwsJRT>{Cf{6G8k)Wbj`Vji7G`*ATrY!`2bYSM* zd+zzp<2&cfd;Nvi+gsPPavay5+l-5B?FiqN73{n2>AcRCmucS+9dJizRrd*}nQobY zoUMU`M zu*?)cDCJ?^%aDq-dD15XlZBEoIc6v(zv(s5Q&X7%n@}Cp>~SYhYbk!guFCeISmeQi z3LQ)Fi$M+L`$5L_36KOBHDD5fWI{j*s3eq)AO;Z>QA~t#6hT#zRfs_2;h8tz98rrn z+wjFsDZWCfr;1{=S{15s!SzQ)q$r9AV`3~8Wg5|-?ohoJb%M^O1xy0Nw>)aO4hSvk zWp{$6coykm3bvQeFBx`%22qSMv8H<>5};_?VO|T`0WFe$!dO;2DAhe87D?bv_y()T zNM{qwxO=vvP?1HWzTsP}DEc^djR~7LG>20>yAe#wWE6ElgyaO2V=&o;kdlaNS{5rA z3^hfA$)=6vuqd5TGMRW>Qe+vSKGY?}(rF|?Nx|8yhWnb>oD)#pF-X&|#r!s~v1ek{ zj8Amx`X$#LZ+1X`#iedgaXpY3kOTzsx?wq?BrMQkzL@ydTg1%zt_>C#R;^_sfQkQR zuBBy`3{1)zmXU@vzJWFW4{IU|Mhx5IU+vNqu^tS!OU=&?OXEWvHZwjOj?B`Cj|f`uDRf@w2_pO+6?)SZCkfwf&F1^Cv#yyvsUnd3(>; z&)4iTy^-C+g9kTW{AT}b{NdW2+qUT4FZK>!KRGyiWBckS$rE#JTW9t zZ4YAcB!WLEhMg6!f5of(n9&3JM;qc+g3^TNR221If(1dEfi_-g`OH z)w#80SsS5 zMW!(Lb+ic%(&O<#aK5L`FPYfd{PdGtGsMYY4iu#bd13h_{2(R%bXRl$_Ie>;j4 zX*9}?z@bGk2X$->xyU0qJ;l)*-gazCQ7eE@N&qPilC2QRi56AO>awN-RaQZ=YGW}h zOlz{H#j~O;Nf2gWs~AtGp$J4-&t_FUQ^n@IkeHr@s(u~nw}Q?56RT(eG6@a}7!OuE zpsR=p4vW}lwQiAztYKP?7fGT5&F8D5z&U{IY=B*Mj$y@FBm$85J99NHX<7?NN~$hF zRadzR*8U&X1R9JGwZ|XrQWeo2jJ6BSPY(;@gFHGj0UeG@SEOk=SXXnpS}4D`lYdgT zY<2za^Gl|R>W<@EjD3$Mnr|L#o*w(^@4?3&-H(OV<@@sOm6xYFW=>7Lmd`XvyMJz+ z{HUzmJ3fB(-K!txXWnKn?ld;I+U&&9!yg+CNhiSFhm+m2&qtp%_8vWV{FXTIv}NMc z#G5l(&BpdC-Iojh5eexKGyca_2;_nJF4jD9fj7+eaI kaE;w~y5Vit>h_vd%(lVrTXGj}?~48lxlE@%nch403s1IunE(I) literal 0 HcmV?d00001 diff --git a/plugins/android-designer/src/com/intellij/android/designer/icons/ViewFlipper.png b/plugins/android-designer/src/com/intellij/android/designer/icons/ViewFlipper.png new file mode 100644 index 0000000000000000000000000000000000000000..300ed2d7386db3b16da6fbd9fbe34b9fe593f7eb GIT binary patch literal 1143 zcmbVMO>ERg6n3EsXdwb|f+Cc`QPfMy1z=dMYSL73Ba2R3xY>S`~={LgGg~RRV!}X-_@02jBoj3Wy&87Z@kI0i=inmh72% z^S<}LtCzpfZ0bo?q9es#z|n#*I1~q#Jw+H8CzGzPi}P207lG^O z;+|X?mIISC+>zOkRA)zP_Ux3cI^xhaFc@pxfJc}GVsF}yv{)Ax>}q_Uh-DEhsIVzr zTnwsS9s?!~3CKw>ZNoeQ`K*MpP|d2Jfeb`YMj06@X#};LqCo`OkI21+&V*LM#kMbg z(!~a2fhNn%W>aeROEjF6k*caP%*dHcnroz^md~s>?MJ;G3z$T9=myNCK1eKD<8+4U zB9C-21urOQ8-JMB2+1z@z_x7%X^WV%r gb^aS)(eqK4aObAIb8=(Xr^&CNG(3vW7xsPo8jaj?_W%F@ literal 0 HcmV?d00001 diff --git a/plugins/android-designer/src/com/intellij/android/designer/icons/ViewSwitcher.png b/plugins/android-designer/src/com/intellij/android/designer/icons/ViewSwitcher.png new file mode 100644 index 0000000000000000000000000000000000000000..adc0abe98db20e94474d8fb63e317cc04dbbafeb GIT binary patch literal 1105 zcmbVLO=#0l9FGcPQ>Pp1VG8=lP;uDgy{>JRxH{5i?J9Q8wqm`RC2wokk{6RV+s%Wp zlM^p8b`Vbr9u))yKR~yOAi@w)!6Aa;MG>8dpa|;A)=q`7gMs9I7(~WDl zuH`tcG1H^v*xD4l^>ysK!Vp0bg+(ZZ5LBX)0uiV_JhSGR14>RyRc*0ToG(%8Dxz2}mxXe> zK)gW_$+9fMuow=97$W44I#jQO9KW@upkd$eESFlu0fD04Pey2*XPz#GV7uAulCa}f z6U9;{R&-ZH0u*gKh-(4u(;WWe#s-O7dnAoE5!Q<+ zKUou*Gh)ylf3-{PiuGWyU21-ISQ;Pfu$l4LaJ22doMwY{I-{wD%G}HROv5x-AKAI? z*5tl-^>-%kUTHfr{xo*}-dNMd#K-x^pt+?XQ9tz_&i~Zkf(JJY?%bt|#}7UwjA^l4WIKBT@)t`c4y`#kd~{Piq)vhCW1OW${` fPQPfJn%OhW*>4XYoBwgM7z}x)yH~rGI6nRxb=zap literal 0 HcmV?d00001 diff --git a/plugins/android-designer/src/com/intellij/android/designer/icons/scroll_to_h_v.png b/plugins/android-designer/src/com/intellij/android/designer/icons/scroll_to_h_v.png new file mode 100644 index 0000000000000000000000000000000000000000..5b69347f124566134c8c27a708236b546fecdbbd GIT binary patch literal 178 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61SBU+%rFB|Y$ZW{!3_UF&^$uA7ATVL>Eakt zacggoBi8`~j^LN`|2FNrC7YrYy#3pzIZmElixzbp;1pvp_`EDCl#|bKw!FMVjO@Jp zX7iqTtF;6Scg!>mUbSMEy!8dYd3z#fJ)2t@|7+sa%3@QcBy+WS@|mZsVxLrX-hRYX YeLm#)jD()sKr0zMUHx3vIVCg!06HW children = container.getChildren(); + if (insertBefore == null) { + children.add(movedComponent); + } + else { + children.add(children.indexOf(insertBefore), movedComponent); + } + + ApplicationManager.getApplication().runWriteAction(new Runnable() { + @Override + public void run() { + XmlTag xmlTag = movedComponent.getTag(); + + XmlTag parentTag = container.getTag(); + XmlTag nextTag = insertBefore == null ? null : insertBefore.getTag(); + XmlTag newXmlTag; + if (nextTag == null) { + newXmlTag = parentTag.addSubTag(xmlTag, false); + } + else { + newXmlTag = (XmlTag)parentTag.addBefore(xmlTag, nextTag); + } + + xmlTag.delete(); + movedComponent.setTag(newXmlTag); + } + }); + + PropertyParser propertyParser = container.getRoot().getClientProperty(PropertyParser.KEY); + propertyParser.load(movedComponent); + } + public static void addComponent(RadViewComponent container, RadViewComponent newComponent, @Nullable RadViewComponent insertBefore) throws Exception { newComponent.setParent(container); @@ -135,13 +172,13 @@ public class ModelParser extends XmlRecursiveElementVisitor { children.add(children.indexOf(insertBefore), newComponent); } - setComponentTag(container.getTag(), newComponent, insertBefore == null ? null : insertBefore.getTag()); + addComponentTag(container.getTag(), newComponent, insertBefore == null ? null : insertBefore.getTag()); PropertyParser propertyParser = container.getRoot().getClientProperty(PropertyParser.KEY); propertyParser.load(newComponent); } - public static void setComponentTag(final XmlTag parentTag, final RadViewComponent component, final XmlTag nextTag) { + public static void addComponentTag(final XmlTag parentTag, final RadViewComponent component, final XmlTag nextTag) { ApplicationManager.getApplication().runWriteAction(new Runnable() { @Override public void run() { diff --git a/plugins/android-designer/src/com/intellij/android/designer/model/PropertyParser.java b/plugins/android-designer/src/com/intellij/android/designer/model/PropertyParser.java index b1fcb7f861ed..62c155ea5646 100644 --- a/plugins/android-designer/src/com/intellij/android/designer/model/PropertyParser.java +++ b/plugins/android-designer/src/com/intellij/android/designer/model/PropertyParser.java @@ -197,6 +197,17 @@ public class PropertyParser { return properties; } + public boolean isAssignableFrom(MetaModel base, MetaModel test) { + try { + Class baseClass = myClassLoader.loadClass(base.getTarget()); + Class testClass = myClassLoader.loadClass(test.getTarget()); + return baseClass.isAssignableFrom(testClass); + } + catch (Throwable e) { + } + return false; + } + @NotNull public ResourceDialog createResourceDialog(ResourceType[] types) { return new ResourceDialog(myModule, types); diff --git a/plugins/android-designer/src/com/intellij/android/designer/model/RadImageSwitcherLayout.java b/plugins/android-designer/src/com/intellij/android/designer/model/RadImageSwitcherLayout.java new file mode 100644 index 000000000000..ce4821e3431e --- /dev/null +++ b/plugins/android-designer/src/com/intellij/android/designer/model/RadImageSwitcherLayout.java @@ -0,0 +1,25 @@ +/* + * Copyright 2000-2012 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.intellij.android.designer.model; + +/** + * @author Alexander Lobas + */ +public class RadImageSwitcherLayout extends RadTypeSwitcherLayout { + public RadImageSwitcherLayout() { + super("ImageView"); + } +} \ No newline at end of file diff --git a/plugins/android-designer/src/com/intellij/android/designer/model/RadScrollViewComponent.java b/plugins/android-designer/src/com/intellij/android/designer/model/RadScrollViewComponent.java index 34ff955852a7..163178a83053 100644 --- a/plugins/android-designer/src/com/intellij/android/designer/model/RadScrollViewComponent.java +++ b/plugins/android-designer/src/com/intellij/android/designer/model/RadScrollViewComponent.java @@ -15,8 +15,62 @@ */ package com.intellij.android.designer.model; +import com.intellij.designer.designSurface.DesignerEditorPanel; +import com.intellij.designer.model.MetaManager; +import com.intellij.designer.model.MetaModel; +import com.intellij.designer.model.RadComponent; +import com.intellij.openapi.actionSystem.AnAction; +import com.intellij.openapi.actionSystem.AnActionEvent; +import com.intellij.openapi.actionSystem.DefaultActionGroup; +import com.intellij.openapi.application.ApplicationManager; +import com.intellij.openapi.util.IconLoader; +import com.intellij.util.ThrowableRunnable; + +import javax.swing.*; +import java.util.List; + /** * @author Alexander Lobas */ public class RadScrollViewComponent extends RadViewComponent { + private static final Icon SCROLL = IconLoader.getIcon("/com/intellij/android/designer/icons/scroll_to_h_v.png"); + + @Override + public void addSelectionActions(DesignerEditorPanel designer, + DefaultActionGroup actionGroup, + JComponent shortcuts, + List selection) { + if (selection.size() == 1) { + addScrollAction(designer, actionGroup, shortcuts, this); + } + } + + public static void addScrollAction(final DesignerEditorPanel designer, + DefaultActionGroup actionGroup, + JComponent shortcuts, + final RadViewComponent scrollContainer) { + String text = "Convert ScrollView to horizontal/vertical"; + actionGroup.add(new AnAction(text, text, SCROLL) { + @Override + public void actionPerformed(AnActionEvent e) { + designer.getToolProvider().execute(new ThrowableRunnable() { + @Override + public void run() throws Exception { + MetaManager manager = ViewsMetaManager.getInstance(scrollContainer.getTag().getProject()); + MetaModel vScrollView = manager.getModelByTag("ScrollView"); + MetaModel hScrollView = manager.getModelByTag("HorizontalScrollView"); + + scrollContainer.setMetaModel(scrollContainer.getMetaModel() == vScrollView ? hScrollView : vScrollView); + + ApplicationManager.getApplication().runWriteAction(new Runnable() { + @Override + public void run() { + scrollContainer.getTag().setName(scrollContainer.getMetaModel().getTag()); + } + }); + } + }); + } + }); + } } \ No newline at end of file diff --git a/plugins/android-designer/src/com/intellij/android/designer/model/RadScrollViewLayout.java b/plugins/android-designer/src/com/intellij/android/designer/model/RadScrollViewLayout.java new file mode 100644 index 000000000000..dd123d7ae30d --- /dev/null +++ b/plugins/android-designer/src/com/intellij/android/designer/model/RadScrollViewLayout.java @@ -0,0 +1,38 @@ +/* + * Copyright 2000-2012 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.intellij.android.designer.model; + +import com.intellij.designer.designSurface.DesignerEditorPanel; +import com.intellij.designer.model.RadComponent; +import com.intellij.openapi.actionSystem.DefaultActionGroup; + +import javax.swing.*; +import java.util.List; + +/** + * @author Alexander Lobas + */ +public class RadScrollViewLayout extends RadSingleChildrenViewLayout { + @Override + public void addSelectionActions(DesignerEditorPanel designer, + DefaultActionGroup actionGroup, + JComponent shortcuts, + List selection) { + if (selection.size() == 1) { + RadScrollViewComponent.addScrollAction(designer, actionGroup, shortcuts, (RadViewComponent)myContainer); + } + } +} \ No newline at end of file diff --git a/plugins/android-designer/src/com/intellij/android/designer/model/RadSingleChildrenViewLayout.java b/plugins/android-designer/src/com/intellij/android/designer/model/RadSingleChildrenViewLayout.java index f1ef896eea80..c7e2e0e3aef5 100644 --- a/plugins/android-designer/src/com/intellij/android/designer/model/RadSingleChildrenViewLayout.java +++ b/plugins/android-designer/src/com/intellij/android/designer/model/RadSingleChildrenViewLayout.java @@ -26,7 +26,9 @@ import com.intellij.designer.designSurface.OperationContext; public class RadSingleChildrenViewLayout extends RadViewLayout { @Override public EditOperation processChildOperation(OperationContext context) { - if (myContainer.getChildren().isEmpty() && (context.isCreate() || context.isPaste()) && context.getComponents().size() == 1) { + if (myContainer.getChildren().isEmpty() && + (context.isCreate() || context.isPaste() || context.isAdd()) && + context.getComponents().size() == 1) { if (context.isTree()) { return new TreeDropToOperation(myContainer, context); } diff --git a/plugins/android-designer/src/com/intellij/android/designer/model/RadTextSwitcherLayout.java b/plugins/android-designer/src/com/intellij/android/designer/model/RadTextSwitcherLayout.java new file mode 100644 index 000000000000..59b120f74d0b --- /dev/null +++ b/plugins/android-designer/src/com/intellij/android/designer/model/RadTextSwitcherLayout.java @@ -0,0 +1,27 @@ +/* + * Copyright 2000-2012 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.intellij.android.designer.model; + +import com.intellij.designer.designSurface.OperationContext; + +/** + * @author Alexander Lobas + */ +public class RadTextSwitcherLayout extends RadTypeSwitcherLayout { + public RadTextSwitcherLayout() { + super("TextView"); + } +} \ No newline at end of file diff --git a/plugins/android-designer/src/com/intellij/android/designer/model/RadTypeSwitcherLayout.java b/plugins/android-designer/src/com/intellij/android/designer/model/RadTypeSwitcherLayout.java new file mode 100644 index 000000000000..7808fa3fffe7 --- /dev/null +++ b/plugins/android-designer/src/com/intellij/android/designer/model/RadTypeSwitcherLayout.java @@ -0,0 +1,55 @@ +/* + * Copyright 2000-2012 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.intellij.android.designer.model; + +import com.intellij.designer.designSurface.OperationContext; +import com.intellij.designer.model.MetaManager; +import com.intellij.designer.model.MetaModel; +import com.intellij.designer.model.RadComponent; + +/** + * @author Alexander Lobas + */ +public class RadTypeSwitcherLayout extends RadViewSwitcherLayout { + private final String myTypeTag; + private MetaModel myTypeModel; + + public RadTypeSwitcherLayout(String tag) { + myTypeTag = tag; + } + + @Override + protected boolean checkChildOperation(OperationContext context) { + if (super.checkChildOperation(context)) { + if (myTypeModel == null) { + MetaManager manager = ViewsMetaManager.getInstance(((RadViewComponent)myContainer).getTag().getProject()); + myTypeModel = manager.getModelByTag(myTypeTag); + } + + PropertyParser parser = myContainer.getRoot().getClientProperty(PropertyParser.KEY); + + for (RadComponent component : context.getComponents()) { + if (!parser.isAssignableFrom(myTypeModel, component.getMetaModel())) { + return false; + } + } + + return true; + } + + return false; + } +} \ No newline at end of file diff --git a/plugins/android-designer/src/com/intellij/android/designer/model/RadViewAnimatorLayout.java b/plugins/android-designer/src/com/intellij/android/designer/model/RadViewAnimatorLayout.java new file mode 100644 index 000000000000..45185f5c29db --- /dev/null +++ b/plugins/android-designer/src/com/intellij/android/designer/model/RadViewAnimatorLayout.java @@ -0,0 +1,41 @@ +/* + * Copyright 2000-2012 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.intellij.android.designer.model; + +import com.intellij.android.designer.designSurface.DropToOperation; +import com.intellij.android.designer.designSurface.TreeDropToOperation; +import com.intellij.designer.designSurface.EditOperation; +import com.intellij.designer.designSurface.OperationContext; + +/** + * @author Alexander Lobas + */ +public class RadViewAnimatorLayout extends RadViewLayout { + public EditOperation processChildOperation(OperationContext context) { + if ((context.isCreate() || context.isPaste() || context.isAdd()) && checkChildOperation(context)) { + if (context.isTree()) { + return new TreeDropToOperation(myContainer, context); + } + return new DropToOperation((RadViewComponent)myContainer, context); + } + + return null; + } + + protected boolean checkChildOperation(OperationContext context) { + return true; + } +} \ No newline at end of file diff --git a/plugins/android-designer/src/com/intellij/android/designer/model/RadViewSwitcherLayout.java b/plugins/android-designer/src/com/intellij/android/designer/model/RadViewSwitcherLayout.java new file mode 100644 index 000000000000..7f99403f539d --- /dev/null +++ b/plugins/android-designer/src/com/intellij/android/designer/model/RadViewSwitcherLayout.java @@ -0,0 +1,28 @@ +/* + * Copyright 2000-2012 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.intellij.android.designer.model; + +import com.intellij.designer.designSurface.OperationContext; + +/** + * @author Alexander Lobas + */ +public class RadViewSwitcherLayout extends RadViewAnimatorLayout { + @Override + protected boolean checkChildOperation(OperationContext context) { + return myContainer.getChildren().size() < 2; + } +} \ No newline at end of file diff --git a/plugins/android-designer/src/com/intellij/android/designer/model/views-meta-model.xml b/plugins/android-designer/src/com/intellij/android/designer/model/views-meta-model.xml index 15dd71e8da68..85f7bcaeebab 100644 --- a/plugins/android-designer/src/com/intellij/android/designer/model/views-meta-model.xml +++ b/plugins/android-designer/src/com/intellij/android/designer/model/views-meta-model.xml @@ -567,6 +567,7 @@ @@ -586,6 +587,7 @@ @@ -606,6 +608,7 @@ @@ -626,6 +629,7 @@ @@ -643,6 +647,7 @@ @@ -660,6 +665,7 @@ @@ -678,7 +684,12 @@ + + + + @@ -698,6 +709,26 @@ + + + + + + + + ]]> + + + + @@ -717,6 +748,7 @@ @@ -734,7 +766,7 @@ @@ -754,7 +786,7 @@ @@ -773,6 +805,198 @@ + + + + + + + + + ]]> + + + + + + + + + + + + ]]> + + + + + + + + + + ]]> + + + + + + + + + + + + ]]> + + + + + + + + + + + + ]]> + + + + + + + + + + + + ]]> + + + + + + + + + + + + ]]> + + + + + + + + + + ]]> + + + + + + + + + + ]]> + + + + + + + + + + ]]> + + + - + + + @@ -839,9 +1063,18 @@ + + + - + + + + + + + diff --git a/plugins/ui-designer/ui-designer-new/src/com/intellij/designer/DesignerToolWindowManager.java b/plugins/ui-designer/ui-designer-new/src/com/intellij/designer/DesignerToolWindowManager.java index 8ee859cbc358..690475b3e658 100644 --- a/plugins/ui-designer/ui-designer-new/src/com/intellij/designer/DesignerToolWindowManager.java +++ b/plugins/ui-designer/ui-designer-new/src/com/intellij/designer/DesignerToolWindowManager.java @@ -121,7 +121,12 @@ public final class DesignerToolWindowManager implements ProjectComponent { public void refresh() { if (myTreeBuilder != null) { - myTreeBuilder.queueUpdate(); + myTreeBuilder.queueUpdate().doWhenDone(new Runnable() { + @Override + public void run() { + myComponentTree.repaint(); + } + }); } } diff --git a/plugins/ui-designer/ui-designer-new/src/com/intellij/designer/actions/DesignerActionPanel.java b/plugins/ui-designer/ui-designer-new/src/com/intellij/designer/actions/DesignerActionPanel.java index fa6bc87f4d46..2705d49328bb 100644 --- a/plugins/ui-designer/ui-designer-new/src/com/intellij/designer/actions/DesignerActionPanel.java +++ b/plugins/ui-designer/ui-designer-new/src/com/intellij/designer/actions/DesignerActionPanel.java @@ -40,10 +40,12 @@ public class DesignerActionPanel implements DataProvider { private final DefaultActionGroup myStaticGroup = new DefaultActionGroup(); private final DefaultActionGroup myDynamicGroup = new DefaultActionGroup(); private JComponent myToolbar; + private final DesignerEditorPanel myDesigner; private final CommonEditActionsProvider myCommonEditActionsProvider; private final JComponent myShortcuts; public DesignerActionPanel(DesignerEditorPanel designer, JComponent shortcuts) { + myDesigner = designer; myCommonEditActionsProvider = new CommonEditActionsProvider(designer); myShortcuts = shortcuts; @@ -128,10 +130,10 @@ public class DesignerActionPanel implements DataProvider { } for (RadComponent parent : parents) { - parent.getLayout().addSelectionActions(myDynamicGroup, myShortcuts, selection); + parent.getLayout().addSelectionActions(myDesigner, myDynamicGroup, myShortcuts, selection); } for (RadComponent component : selection) { - component.addSelectionActions(myDynamicGroup, myShortcuts, selection); + component.addSelectionActions(myDesigner, myDynamicGroup, myShortcuts, selection); } update |= isVisible(myDynamicGroup); diff --git a/plugins/ui-designer/ui-designer-new/src/com/intellij/designer/model/RadComponent.java b/plugins/ui-designer/ui-designer-new/src/com/intellij/designer/model/RadComponent.java index 05ed077f0b91..11b10e28e919 100644 --- a/plugins/ui-designer/ui-designer-new/src/com/intellij/designer/model/RadComponent.java +++ b/plugins/ui-designer/ui-designer-new/src/com/intellij/designer/model/RadComponent.java @@ -15,6 +15,7 @@ */ package com.intellij.designer.model; +import com.intellij.designer.designSurface.DesignerEditorPanel; import com.intellij.designer.designSurface.OperationContext; import com.intellij.designer.designSurface.tools.DragTracker; import com.intellij.designer.designSurface.tools.InputTool; @@ -103,7 +104,10 @@ public abstract class RadComponent { public void processDropOperation(OperationContext context) { } - public void addSelectionActions(DefaultActionGroup actionGroup, JComponent shortcuts, List selection) { + public void addSelectionActions(DesignerEditorPanel designer, + DefaultActionGroup actionGroup, + JComponent shortcuts, + List selection) { } ////////////////////////////////////////////////////////////////////////////////////////// // diff --git a/plugins/ui-designer/ui-designer-new/src/com/intellij/designer/model/RadLayout.java b/plugins/ui-designer/ui-designer-new/src/com/intellij/designer/model/RadLayout.java index 509ed90ffdc8..50f5a59356f3 100644 --- a/plugins/ui-designer/ui-designer-new/src/com/intellij/designer/model/RadLayout.java +++ b/plugins/ui-designer/ui-designer-new/src/com/intellij/designer/model/RadLayout.java @@ -16,6 +16,7 @@ package com.intellij.designer.model; import com.intellij.designer.designSurface.ComponentDecorator; +import com.intellij.designer.designSurface.DesignerEditorPanel; import com.intellij.designer.designSurface.EditOperation; import com.intellij.designer.designSurface.OperationContext; import com.intellij.openapi.actionSystem.DefaultActionGroup; @@ -41,6 +42,9 @@ public abstract class RadLayout { return null; } - public void addSelectionActions(DefaultActionGroup actionGroup, JComponent shortcuts, List selection) { + public void addSelectionActions(DesignerEditorPanel designer, + DefaultActionGroup actionGroup, + JComponent shortcuts, + List selection) { } } \ No newline at end of file