summaryrefslogtreecommitdiff
path: root/src/swing
Commit message (Collapse)AuthorAgeFilesLines
* Remove spurious resurrection of src/swing.Adriaan Moors2013-12-181-174/+0
|
* Modularize the swing library.Adriaan Moors2013-12-1392-5221/+0
| | | | | The Scala Swing library will still ship with 2.11 (albeit unsupported). It now resides at https://github.com/scala/scala-swing.
* Merge commit '0c92704' into merge/2.10.x-to-masterJason Zaugg2013-12-111-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | Conflicts: bincompat-forward.whitelist.conf src/interactive/scala/tools/nsc/interactive/Global.scala test/files/presentation/scope-completion-2.check test/files/presentation/scope-completion-3.check test/files/presentation/scope-completion-import.check Conflicts in the scope completion tests handled with the help of @skyluc in https://github.com/scala/scala/pull/3264
| * SI-8019 Make Publisher check PartialFunction is defined for EventRoberto Tyley2013-12-091-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | Reactions are PartialFunctions, so if events come through indiscriminately that the listener is not defined for, errors occur. Eg: -- Exception in thread "AWT-EventQueue-0" scala.MatchError: FocusGained(scala.swing wrapper scala.swing.TextField -- A Coursera thread with people affected by this issue: https://class.coursera.org/reactive-001/forum/thread?thread_id=1315
| * [nomaster] Revert "Added a Swing ColorChooser wrapper"Adriaan Moors2013-02-122-59/+0
| | | | | | | | | | | | This reverts commit 08ab007c5c97f153902c4ac58f87e30fbf7cf99f. This is necessary to maintain binary compatibility with 2.10.0.
| * [nomaster] Revert "Added a Swing PopupMenu wrapper"Adriaan Moors2013-02-122-83/+0
| | | | | | | | | | | | This reverts commit bdff881f8a15d4de0c0ff2aa2427f0d8244d2d42. This is necessary to maintain binary compatibility with 2.10.0.
| * SI-6641 Deprecate SwingWorkerJason Zaugg2013-01-082-22/+4
| | | | | | | | See discussion: https://github.com/scala/scala/pull/1862
* | Collections library tidying and deprecation. Separate parts are listed below.Rex Kerr2013-11-071-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Collections library tidying, part one: scripting. Everything in scala.collection.scripting is deprecated now, along with the << method that is implemented in a few other classes. Scripting does not seem used at all, and anyone who did can easily write a wrapper that does the same thing. Deprecated *Proxy collections. The only place proxies were used in the library was in swing.ListView, and that was easy to change to a lazy val. Proxy itself is used in ScalaNumberProxy and such, so it was left undeprecated. Deprecated Synchronized* traits from collections. Synchronizability does not compose well, and it requires careful examination of every method (which has not actually been done). Places where the Scala codebase needs to be fixed (eventually) include: scala.reflect.internal.util.Statistics$QuantMap scala.tools.nsc.interactive.Global (several places) Deprecated LinkedList (including Double- and -Like variants). Interface is idiosyncratic and dangerously low-level. Although some low-level functionality of this sort would be useful, this doesn't seem to be the ideal implementation. Also deprecated the extractFirst method in Queue as it exposes LinkedList. Cannot shift internal representations away from LinkedList at this time because of that method. Deprecated non-finality of several toX collection methods. Improved documentation of most toX collection methods to describe what the expectation is for their behavior. Additionally deprecated overriding of - toIterator in IterableLike (should always forward to iterator) - toTraversable in TraversableLike (should always return self) - toIndexedSeq in immutable.IndexedSeq (should always return self) - toMap in immutable.Map (should always return self) - toSet in immutable.Set (should always return self) Did not do anything with IterableLike.toIterable or Seq/SeqLike.toSeq since for some odd reason immutable.Range overrides those. Deprecated Forwarders from collections. Forwarding, without an automatic mechanism to keep up to date with changes in the forwarded class, is inherently unreliable. Absent a mechanism to keep current, they're deprecated. ListBuffer is the only class in the collections library that uses forwarders, and that functionality can be rolled into ListBuffer itself. Deprecating immutable set/map adaptors. They're a bad idea (barring compiler support) for the same reason that all the other adaptors are a bad idea: they get out of date and probably have a variety of performance bugs. Deprecated inheritance from leaf classes in immutable collections. Inheriting from leaf-classes in immutable collections is rarely a good idea since whenever you use any interesting collections method you'll revert to the original class. Also, the methods are often designed to work with only particular behavior, and an override would be difficult (at best) to make work. Fortunately, people seem to have realized this and there are few to no cases of people extending PagedSeq and TreeSet and the like. Note that in many cases the classes will become sealed not final. Deprecated overriding of methods and inheritance from various mutable collections. Some mutable collections seem unsuited for overriding since to override anything interesting you would need vast knowledge of internal data structures and/or access to private methods. These include - ArrayBuilder.ofX classes. - ArrayOps - Some methods of BitSet (moved others from private to protected final) - Some methods of HashTable and FlatHashTable - Some methods of HashMap and HashSet (esp += and -= which just forward) - Some methods of other maps and sets (LinkedHashX, ListMap, TreeSet) - PriorityQueue - UnrolledBuffer This is a somewhat aggressive deprecation, the theory being better to try it out now and back off if it's too much than not attempt the change and be stuck with collections that can neither be safely inherited nor have implementation details changed. Note that I have made no changes--in this commit--which would cause deprecation warnings in any of the Scala projects available on Maven (at least as gathered by Adriaan). There are deprecation warnings induced within the library (esp. for classes/traits that should become static) and the compiler. I have not attempted to fix all the deprecations in the compiler as some of them touch the IDE API (but these mostly involved Synchronized which is inherently unsafe, so this should be fixed eventually in coordination with the IDE code base(s)). Updated test checks to include new deprecations. Used a higher level implementation for messages in JavapClass.
* | Make all numeric coercions explicit.Paul Phillips2013-05-271-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | Optimistically, this is preparation for a day when we don't let numeric types drift with the winds. Even without the optimism it's a good idea. It flushed out an undocumented change in the math package object relative to the methods being forwarded (a type is widened from what is returned in java) so I documented the intentionality of it. Managing type coercions manually is a bit tedious, no doubt, but it's not tedious enough to warrant abandoning type safety just because java did it.
* | Address a deprecation warnings in scala-swing.Jason Zaugg2013-04-281-1/+1
| | | | | | | | While I was in the neighbourhood.
* | SI-6784 Localize feature imports in scala.swing.Jason Zaugg2013-04-287-5/+14
| | | | | | | | | | | | | | | | | | | | | | | | These were inadvertantly added to the public API in f15dc74 for anyone importing scala.swing._, which unintentionally enabled reflectiveCalls and implicitConversions for clients of the API. This change breaks the source compatibiliy poilicy, rather than deprecating these, based on the extremely low chance that someone is using these in something like: import scala.swing._; println(implicitConversions)
* | SI-6641 Cull scala.swing.SwingWorkerJason Zaugg2013-01-082-52/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It appears to do nothing much at all, refers to the now-deprecated scala.actor package, and has a name clash with an important class from java.swing. Note that the POM for scala-swing does not declare the dependency. The final nail in the coffin is it aides and abets the crash in the crash in SI-6440. Attempts to remove or even deprecate this in 2.10.0 were missed the boat. This commit removes them for 2.11.0, in contravention of the deprecation policy. Given that they rely on the scala-actors module which _is_ deprecated in 2.10.0, and will likely be removed in 2.11.0, I contend that this is a reasonable exception. Actor.scala
* | Updated copyright to 2013Carlo Dapor2013-01-024-4/+4
| |
* | Removed unused imports in swing.Paul Phillips2012-11-1914-47/+1
| |
* | Merge commit 'refs/pull/1574/head' into merge-210Paul Phillips2012-11-0582-82/+82
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit 'refs/pull/1574/head': (24 commits) Fixing issue where OSGi bundles weren't getting used for distribution. Fixes example in Type.asSeenFrom Fix for SI-6600, regression with ScalaNumber. SI-6562 Fix crash with class nested in @inline method Brings copyrights in Scaladoc footer and manpage up-to-date, from 2011/12 to 2013 Brings all copyrights (in comments) up-to-date, from 2011/12 to 2013 SI-6606 Drops new icons in, replaces abstract types placeholder icons SI-6132 Revisited, cleaned-up, links fixed, spelling errors fixed, rewordings Labeling scala.reflect and scala.reflect.macros experimental in the API docs Typo-fix in scala.concurrent.Future, thanks to @pavelpavlov Remove implementation details from Position (they are still under reflection.internal). It probably needs more cleanup of the api wrt to ranges etc but let's leave it for later SI-6399 Adds API docs for Any and AnyVal Removing actors-migration from main repository so it can live on elsewhere. Fix for SI-6597, implicit case class crasher. SI-6578 Harden against synthetics being added more than once. SI-6556 no assert for surprising ctor result type Removing actors-migration from main repository so it can live on elsewhere. Fixes SI-6500 by making erasure more regular. Modification to SI-6534 patch. Fixes SI-6559 - StringContext not using passed in escape function. ... Conflicts: src/actors-migration/scala/actors/migration/StashingActor.scala src/compiler/scala/tools/nsc/backend/jvm/GenASM.scala src/compiler/scala/tools/nsc/settings/AestheticSettings.scala src/compiler/scala/tools/nsc/transform/Erasure.scala src/library/scala/Application.scala src/library/scala/collection/immutable/GenIterable.scala.disabled src/library/scala/collection/immutable/GenMap.scala.disabled src/library/scala/collection/immutable/GenSeq.scala.disabled src/library/scala/collection/immutable/GenSet.scala.disabled src/library/scala/collection/immutable/GenTraversable.scala.disabled src/library/scala/collection/mutable/GenIterable.scala.disabled src/library/scala/collection/mutable/GenMap.scala.disabled src/library/scala/collection/mutable/GenSeq.scala.disabled src/library/scala/collection/mutable/GenSet.scala.disabled src/library/scala/collection/mutable/GenTraversable.scala.disabled src/library/scala/collection/parallel/immutable/ParNumericRange.scala.disabled
| * Merge branch '2.10.0-wip' into merge-2.10.0Josh Suereth2012-11-0582-82/+82
| |\
| | * Brings all copyrights (in comments) up-to-date, from 2011/12 to 2013Heather Miller2012-11-0282-82/+82
| | |
* | | Merge branch 'merge-2.10.0-wip' into merge-2.10.xPaul Phillips2012-10-314-0/+142
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * merge-2.10.0-wip: Use Typed rather than .setType Wider use and a new variant of typedPos. SI-6575 Plug inference leak of AbstractPartialFun Remove compiler phases that don't influence scaladoc generation. Disabled generation of _1, _2, etc. methods. SI-6526 Additional test case. Fix SI-6552, regression with self types. avoid single-art assert where harmful in duration-tck Fix for SI-6537, inaccurate unchecked warning. Crash on missing accessor (internal bug in the lazy vals implementation) instead of trying to recover from the bug Incorporated changes suggested in code review Added one more test for SI-6358 Closes SI-6358. Move accessor generation for lazy vals to typers. SI-6526 Tail call elimination should descend deeper. Remove unneeded calls to substring() Changes Tree and Type members from vals to defs. Scaladoc knows the package structure of the libraries, so don't include them in external documentation setting. Fixes SI-6170: issue with dragging scaladoc splitter over central iframe Added a Swing ColorChooser wrapper Added a Swing PopupMenu wrapper Conflicts: src/compiler/scala/reflect/reify/phases/Reshape.scala src/compiler/scala/tools/nsc/typechecker/Duplicators.scala src/continuations/plugin/scala/tools/selectivecps/SelectiveCPSTransform.scala src/reflect/scala/reflect/internal/Types.scala test/files/neg/unchecked-knowable.check
| * | Added a Swing ColorChooser wrapperingoem2012-09-262-0/+59
| | |
| * | Added a Swing PopupMenu wrapperingoem2012-09-262-0/+83
| |/
* | Merge pull request #1473 from soc/SI-6388-without-predefAdriaan Moors2012-10-191-3/+0
|\ \ | | | | | | SI-6388 Remove deprecated items scheduled for 2.11
| * | SI-6388 Remove deprecated item in scala/swingSimon Ochsenreither2012-10-081-3/+0
| | |
* | | Removed .disabled files.Paul Phillips2012-10-181-70/+0
|/ / | | | | | | | | | | These things don't belong in trunk. They poison all my searches with bogus results. I'd say two years was about 1.999 years too long.
* | Merge branch '2.10.x' into masterPaul Phillips2012-09-191-2/+2
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 2.10.x: (51 commits) improved/fixed reflection docs based on comments Fixes SI-6354: improved error messages for Dynamic signature mismatches. Add RedBlackTree tests for take/drop/slice. Retain Ordering in drop/take/slice signatures. test case closes SI-5770 clarify caveats of App trait Remove `@static` annotation from the library. New starr that does not depend on `@static`. improved reflection documentation pull request feedback SI-5692 better error message SI-5942 toolboxes now reset front ends SI-6287 fixes synthetic symbol clashes in toolbox Revert "Implement @static annotation on singleton object fields." Revert "WIP add private/lazy checks and a few tests." Revert "Fixes SI-6189." Revert "Fixes SI-6236." Revert "Fix SI-4581." Revert "Fix SI-6294." refactors java reflection tests ... Conflicts: src/compiler/scala/tools/nsc/typechecker/Typers.scala src/partest/scala/tools/partest/package.scala src/reflect/scala/reflect/internal/Trees.scala
| * More relative path elimination.Paul Phillips2012-09-151-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some names I missed in 55b609458fd . How one might know when one is done: mkdir scratch && cd scratch mkdir annotation beans collection compat concurrent io \ math parallel ref reflect runtime scala sys testing \ text tools util xml scalac $(find ../src/library -name '*.scala') Until recently that would fail with about a billion errors. When it compiles, that's when you're done. And that's where this commit takes us, for src/library at least.
* | Warn when Any or AnyVal is inferred.Paul Phillips2012-08-092-2/+2
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For the very small price of annotating types as Any/AnyVal in those cases where we wish to use them, we can obtain useful warnings. I made trunk clean against this warning and found several bugs or at least suboptimalities in the process. I put the warning behind -Xlint for the moment, but I think this belongs on by default, even for this alone: scala> List(1, 2, 3) contains "a" <console>:8: warning: a type was inferred to be `Any`; this may indicate a programming error. List(1, 2, 3) contains "a" ^ res0: Boolean = false Or this punishment meted out by SI-4042: scala> 1l to 5l contains 5 <console>:8: warning: a type was inferred to be `AnyVal`; this may indicate a programming error. 1l to 5l contains 5 ^ res0: Boolean = false A different situation where this arises, which I have seen variations of many times: scala> class A[T](default: T) { def get(x: => Option[T]) = x getOrElse Some(default) } <console>:7: warning: a type was inferred to be `Any`; this may indicate a programming error. class A[T](default: T) { def get(x: => Option[T]) = x getOrElse Some(default) } ^ // Oops, this was what I meant scala> class A[T](default: T) { def get(x: => Option[T]) = x getOrElse default } defined class A Harder to avoid spurious warnings when "Object" is inferred.
* Eliminated all the current feature warnings.Paul Phillips2012-07-278-13/+12
| | | | This pretty much takes us down to deprecation and inliner warnings.
* Eliminated remainder of "catches Throwable" warnings.Paul Phillips2012-07-271-1/+1
| | | | | | | | And also non-exhaustive matches. And added -nowarn to the build options for scalacheck, we don't need to hear the warnings for code we aren't able to fix.
* migrates stdlib and compiler to tagsEugene Burmako2012-04-231-16/+16
| | | | | * all usages of ClassManifest and Manifest are replaced with tags * all manifest tests are replaced with tag tests
* Clean up standard/swing library by deprecating/moving code examplesSimon Ochsenreither2011-12-0719-865/+0
| | | | | | | | | Deprecate scala/xml/include/sax/Main.scala. Move scala/swing/test/* to docs/examples. Saves 160KB in scala-swing.jar. Fixes SI-4627.
* Offer warning when demonstrably non-side-effect...Paul Phillips2011-09-051-1/+0
| | | | | | | | Offer warning when demonstrably non-side-effecting expressions appear in statement position, which should be unintentional by definition. Threw in removal of six places with useless discarded expressions which the warning informed me about. No review.
* Removing the code which has been deprecated sin...Paul Phillips2011-08-1510-105/+31
| | | | | | | Removing the code which has been deprecated since 2.8.0. Contributed by Simon Ochsenreither, although deleting code is such fun one hesitates to call it a contribution. Still, we will. Closes SI-4860, no review.
* Reverting changes in r25491, it is Java 6 stuff.Ingo Maier2011-08-121-3/+5
|
* Added some missing methods to ListView.Ingo Maier2011-08-121-0/+5
|
* Allow null components in split pane. Closes #3929.Ingo Maier2011-08-121-4/+4
|
* Pulled up the SuperMixin that calls closeOperat...Ingo Maier2011-08-122-11/+11
| | | | | | Pulled up the SuperMixin that calls closeOperations for frames into window and let dialogs mix it in as well. Closes #3708.
* Added GraphicsConfiguration to window, frame, d...Ingo Maier2011-08-122-21/+19
| | | | | | Added GraphicsConfiguration to window, frame, dialog constructors. Closes #3853.
* Fixes typo in getter methods. Closes #4262.Ingo Maier2011-08-121-2/+2
|
* Fixes typo in setter method. Closes #4811.Ingo Maier2011-08-121-0/+3
|
* Applied patch by Gordon Tyler. Closes #4823.Ingo Maier2011-08-121-1/+4
|
* Install mouse moves listeners lazily.Ingo Maier2011-08-121-18/+27
|
* Following up on things that -Xlint told me, som...Paul Phillips2011-07-291-2/+2
| | | | | | | | | | | | | | | Following up on things that -Xlint told me, sometimes because Mr. Linty was being sensible and other times just to shut him up so we can hear better in the future. - made xml.Equality public because it occurs in public method signatures - made some actor classes with inaccessible-unoverridable methods final - eliminated a bunch of "dead code follows" warnings by deleting the dead code which really did follow - improved the reliability of warnings about inaccessible types For the changes in actors, review by phaller.
* Some minor scaladoc tweaks and deletion of inco...Paul Phillips2011-07-151-3/+3
| | | | | | Some minor scaladoc tweaks and deletion of incorrect scaladoc docs, no review.
* 3rd round of clean ups (see r25285, r25292)michelou2011-07-155-40/+33
|
* Adding some Sets/Maps to perRunCaches, and elim...Paul Phillips2011-07-144-16/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | Adding some Sets/Maps to perRunCaches, and eliminating ambiguously named imports. Did a tour of the compiler adding a few longer-lived mutable structures to the per-run cache clearing mechanism. Some of these were not a big threat, but there is (almost) literally no cost to tracking them and the fewer mutable structures which are created "lone wolf style" the easier it is to spot the one playing by his own rules. While I was at it I followed through on long held ambition to eliminate the importing of highly ambiguous names like "Map" and "HashSet" from the mutable and immutable packages. I didn't quite manage elimination but it's pretty close. Something potentially as pernicious which I didn't do much about is this import: import scala.collection._ Imagine coming across that one on lines 407 and 474 of a 1271 file. That's not cool. Some poor future programmer will be on line 1100 and use "Map[A, B]" in some function and only after the product has shipped will it be discovered that the signature is wrong and the rocket will now be crashing into the mountainside straightaway. No review.
* Warning! Warning! Yes, that's what's in this co...Paul Phillips2011-06-291-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Warning! Warning! Yes, that's what's in this commit. Why are you panicking? Mostly new command line options: -Xlint // basically, the ones which aren't noisy Ywarn-all -Ywarn-dead-code Ywarn-inaccessible // try this one on the library: -it makes some good points Ywarn-nullary-override Ywarn-nullary-unit -Ywarn-numeric-widen Ywarn-value-discard Some accumulated motivations: The wontfix resolution of ticket #4506 indicates that "def foo" and "def foo()" are always going to be treated differently in some situations and the same in others without users having any way to fix it. Summary expressed in latest comment with which I agree (and quite sadly, given that I've done a lot of work to try to make them usable) is "avoid using structural types like the plague." But the least we can do is warn if you're using parentheses "wrong". I think it would be better if the warning about "def foo()" overriding "def foo" were an error instead. If we have to live with this... trait Me { def f(): Int } class A { def f: Int = 5 } class C extends A with Me { } // error: Int does not take parameters def f(x: C) = x.f() // compiles def f(x: Me) = x.f() // error: Int does not take parameters. Mmph, how can a method be // legal with parameter "Foo" and illegal with parameter "Foo with // Bar" ? def f(x: Me with C) = x.f() The warning about a method contains a reference to a type which is less accessible than the method itself is obviously to those who recall it a response to GenTraversable being private and appearing in flatMap's signature during the 2.9.0 RCs. It avoids warning in the case where the unnormalized type is inaccessible but the normalized version would be, but it could use further refinement.
* Reducing the sbt launcher footprint by eliminat...Paul Phillips2011-05-011-3/+2
| | | | | | | | | | | | Reducing the sbt launcher footprint by eliminating val references which go through the scala package object, since they lead to otherwise unnecessary classes becoming required at startup. Mostly this means library files with constructors like "Iterator.empty" or "Stream.continually" receive a direct import of that companion. The one slightly less than cosmetic change was moving the strange xml value "$scope" back into Predef, because otherwise I have to touch the xml code generation. No review.
* After having to update the code for someone els...Paul Phillips2011-04-301-1/+1
| | | | | | | After having to update the code for someone else, ran damarau levenshtein on trunk again. Patchwise, I guess correcting spelling errors in comments is about as safe as it gets. No review.
* I wrote a warning when nullary methods return U...Paul Phillips2011-04-286-8/+8
| | | | | | | | | | | | | | | I wrote a warning when nullary methods return Unit. I wimped out of including it in this patch because we had about 200 of them, and that's what is fixed in this patch. I will add the warning to some kind of "-Xlint" feature after 2.9. This is motivated at least partly by the resolution of #4506, which indicates the distinction between "def foo()" and "def foo" will continue to jab its pointy stick into our eyes, so I believe we have a minimal duty of at least following our own advice about what they mean and not making a semirandom choice as to whether a method has parens or not. Review by community.
* Updated a bunch of @deprecated annotations to h...Paul Phillips2011-04-246-13/+13
| | | | | Updated a bunch of @deprecated annotations to have a version, no review.